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 6 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 ✅

Project coverage is 91.91%. Comparing base (abb80ff) to head (128e3da).
Report is 79 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4184      +/-   ##
==========================================
+ Coverage   91.85%   91.91%   +0.05%     
==========================================
  Files         144      145       +1     
  Lines       16419    16708     +289     
  Branches     3434     3552     +118     
==========================================
+ Hits        15082    15357     +275     
+ Misses        792      782      -10     
- Partials      545      569      +24     
Flag Coverage Δ
macos-latest_3.11_test_plotting ?
macos-latest_3.9_test_plotting 91.74% <100.00%> (?)
ubuntu-latest_3.10_test_plotting ?
ubuntu-latest_3.11_test_plotting 91.77% <100.00%> (?)
ubuntu-latest_3.12_test_plotting 91.77% <100.00%> (?)
ubuntu-latest_3.12_test_pre 91.77% <100.00%> (?)
ubuntu-latest_3.8_test_plot_min 91.44% <100.00%> (?)
ubuntu-latest_3.8_test_plotting 91.73% <100.00%> (?)
ubuntu-latest_3.9_test_plotting 91.74% <100.00%> (?)
windows-latest_3.8_test_plotting 91.72% <100.00%> (?)
windows-latest_3.9_test_plotting 91.73% <100.00%> (?)

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