Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Adds an imshow-based option for autoalign plotting of maps#8036

Merged
nabobalis merged 20 commits into
sunpy:mainfrom
Prtm2110:imshow_transform
May 12, 2025
Merged

Adds an imshow-based option for autoalign plotting of maps#8036
nabobalis merged 20 commits into
sunpy:mainfrom
Prtm2110:imshow_transform

Conversation

@Prtm2110
Copy link
Copy Markdown
Contributor

@Prtm2110 Prtm2110 commented Jan 24, 2025

Edit by @ayshih:

This PR:

  • Adds an imshow-based option for autoalign plotting of maps (autoalign='image')
  • Renames the existing pcolormesh-based option (autoalign='pcolormesh' -> autoalign='mesh')

PR Description

Fixes #6812 and Related to #6814
I am converting this to draft to experiment with and if the works then i will then make minor changes as this will conflict with #7772

Comment thread sunpy/map/tests/test_plotting.py Outdated
@Prtm2110
Copy link
Copy Markdown
Contributor Author

Prtm2110 commented Jan 24, 2025

IMG_20250124_230006
I am not sure why the image is shifted like that, I tried setting NAXIS1/2 but still same result @nabobalis could you please provide an initial review on this if possible.

@nabobalis nabobalis requested a review from ayshih January 25, 2025 06:49
@nabobalis nabobalis added map Affects the map submodule No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers) labels Feb 1, 2025
@wtbarnes wtbarnes added this to the 7.0.0 milestone Feb 26, 2025
Copy link
Copy Markdown
Member

@Cadair Cadair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

Comment thread sunpy/map/mapbase.py Outdated
Comment thread sunpy/map/mapbase.py Outdated
@ayshih
Copy link
Copy Markdown
Member

ayshih commented May 10, 2025

Here's the figure test showing how the imshow-based approach ("image") can't quite plot everything, unlike the pcolormesh-based approach ("mesh"):

result (5)

@ayshih ayshih changed the title Adds "imshow" as an option for autoalign plotting of maps Adds an imshow-based option for autoalign plotting of maps May 12, 2025
@ayshih
Copy link
Copy Markdown
Member

ayshih commented May 12, 2025

This PR is ready for reviewing! (ideally not by me, given my extensive work on it)

@ayshih ayshih marked this pull request as ready for review May 12, 2025 13:04
@ayshih ayshih requested a review from a team as a code owner May 12, 2025 13:04
Comment thread sunpy/map/mapbase.py
@nabobalis nabobalis removed the request for review from ayshih May 12, 2025 16:18
Comment thread sunpy/map/mapbase.py
@nabobalis
Copy link
Copy Markdown
Member

I probs screwed up the merge, I will wait for the CI first.

@nabobalis nabobalis merged commit d088f4f into sunpy:main May 12, 2025
24 of 29 checks passed
@Prtm2110 Prtm2110 deleted the imshow_transform branch May 12, 2025 17:12
@ayshih
Copy link
Copy Markdown
Member

ayshih commented May 12, 2025

Whoops, there's a bug in this PR when indexing the grid perimeter for the corners. I'll fix it as part of my follow-up PR that ties all of the autoalign stuff together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

map Affects the map submodule No Backport A PR that isn't to be backported to any release branch. (To be used as a flag to other maintainers)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "imshow" as an option for autoalign plotting of maps

6 participants