Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Fix aspect ratio for flat maps #4184

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ymzayek
Copy link
Member

@ymzayek ymzayek commented Jan 5, 2024

Changes proposed in this pull request:

  • Fix aspect ratio for plot_surf and view_surf

Copy link
Contributor

github-actions bot commented Jan 5, 2024

👋 @ymzayek Thanks for creating a PR!

Until this PR is ready for review, you can include the [WIP] tag in its title, or leave it as a github draft.

Please make sure it is compliant with our contributing guidelines. In particular, be sure it checks the boxes listed below.

  • PR has an interpretable title.
  • PR links to Github issue with mention Closes #XXXX (see our documentation on PR structure)
  • Code is PEP8-compliant (see our documentation on coding style)
  • Changelog or what's new entry in doc/changes/latest.rst (see our documentation on PR structure)

For new features:

  • There is at least one unit test per new function / class (see our documentation on testing)
  • The new feature is demoed in at least one relevant example.

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

We will review it as quick as possible, feel free to ping us with questions if needed.

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c8aed35) 92.00% compared to head (3fec94a) 92.10%.
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4184      +/-   ##
==========================================
+ Coverage   92.00%   92.10%   +0.09%     
==========================================
  Files         145      144       -1     
  Lines       16378    16375       -3     
  Branches     3431     3428       -3     
==========================================
+ Hits        15069    15082      +13     
+ Misses        768      754      -14     
+ Partials      541      539       -2     
Flag Coverage Δ
macos-latest_3.10_test_plotting 91.89% <100.00%> (+0.10%) ⬆️
macos-latest_3.11_test_plotting 91.89% <100.00%> (+0.10%) ⬆️
macos-latest_3.12_test_plotting 91.89% <100.00%> (+0.10%) ⬆️
macos-latest_3.8_test_plotting 91.85% <100.00%> (+0.10%) ⬆️
macos-latest_3.9_test_plotting 91.86% <100.00%> (+0.10%) ⬆️
ubuntu-latest_3.10_test_plotting 91.89% <100.00%> (+0.10%) ⬆️
ubuntu-latest_3.11_test_plotting 91.89% <100.00%> (+0.10%) ⬆️
ubuntu-latest_3.12_test_plotting 91.89% <100.00%> (+0.10%) ⬆️
ubuntu-latest_3.12_test_pre 91.89% <100.00%> (+0.10%) ⬆️
ubuntu-latest_3.8_test_min 68.94% <0.00%> (-0.04%) ⬇️
ubuntu-latest_3.8_test_plot_min 91.60% <100.00%> (+0.09%) ⬆️
ubuntu-latest_3.8_test_plotting 91.85% <100.00%> (+0.10%) ⬆️
ubuntu-latest_3.9_test_plotting 91.86% <100.00%> (+0.10%) ⬆️
windows-latest_3.10_test_plotting 91.87% <100.00%> (+0.10%) ⬆️
windows-latest_3.11_test_plotting 91.87% <100.00%> (+0.10%) ⬆️
windows-latest_3.12_test_plotting 91.87% <100.00%> (+0.10%) ⬆️
windows-latest_3.8_test_plotting 91.83% <100.00%> (+0.10%) ⬆️
windows-latest_3.9_test_plotting 91.83% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ymzayek
Copy link
Member Author

ymzayek commented Jan 5, 2024

@ymzayek ymzayek marked this pull request as draft January 5, 2024 14:10
@ymzayek
Copy link
Member Author

ymzayek commented Jan 5, 2024

Hm from what I understood in the original PR this change shouldn't affect the initial zoom with plotting in standard space with view_surf but it doesn't seem to be the case anymore: e.g. in this example: https://output.circle-artifacts.com/output/job/65338cde-650d-4572-9427-b880f0ca272f/artifacts/0/dev/auto_examples/01_plotting/plot_3d_map_to_surface_projection.html#d-visualization-in-a-web-browser

@ymzayek
Copy link
Member Author

ymzayek commented Jan 5, 2024

Also in the plot_surf plots the brains become smaller (compare to dev docs from current main: https://nilearn.github.io/dev/auto_examples/01_plotting/plot_3d_map_to_surface_projection.html)

EDIT: fixed in 0ddd103

@ymzayek
Copy link
Member Author

ymzayek commented Jan 11, 2024

@jeromedockes can you reproduce this https://github.com/nilearn/nilearn/pull/2899/files#r690337773 in this pr?

@ymzayek
Copy link
Member Author

ymzayek commented Jan 11, 2024

Ok I see, the problem sems to be with view_connectome and view_img_on_surf but not with view_img nor view_surf

@Remi-Gau Remi-Gau added the Plotting The issue is related to plotting functionalities. label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plotting The issue is related to plotting functionalities.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting flat maps + plotting additional data as transparency
3 participants