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

ETOPO failed to show with pseudocyl projection #577

Closed
YilongWang opened this issue Jul 2, 2023 · 3 comments
Closed

ETOPO failed to show with pseudocyl projection #577

YilongWang opened this issue Jul 2, 2023 · 3 comments

Comments

@YilongWang
Copy link

YilongWang commented Jul 2, 2023

I have the basemap-1.3.7 and matplotlib-3.7.1.
When the projection is "moll" or "robin", etopo will show nothing.
It can be fixed to add "fill_color='none'" on Line 3206 of __init__.py
In addition, with these projections, the left and right sides of the map have the same longitude, so the x and y in meters will be confused when lon_0 is larger than 0.
I tried to fix this problem with the following steps, though very roughly:
(1) In __init__.py, on Line 4184, subtract 1e-10 from lonright; on L4185 add 1e-10 to lonleft:
lonright = lon_0+180.-1e-10
lonleft = lon_0-180.+1e-10
(2) In proj.py, on Line 199 and Line 240, subtract -1e-10 from urcrnrx:
urcrnrx,xtmp = self(projparams['lon_0']+180.-1e-10,0)

@molinav
Copy link
Member

molinav commented Jul 3, 2023

Hi @YilongWang! Thanks for reporting this issue. I am currently a bit busy, but I will come back to this issue as soon as I can find a spot in my calendar.

@molinav molinav added this to the v1.4.0 milestone Aug 23, 2023
molinav added a commit that referenced this issue Nov 21, 2023
@molinav
Copy link
Member

molinav commented Nov 21, 2023

Sorry for being so delayed with this, @YilongWang! I have just pushed the commit with your correction related to the images being shown behind the map background.

I keep this issue open while I correct your other proposal, since it gives the hints for #463. Once I correct this, both issues will be closed. Thank you for your contributions!

@molinav molinav removed this from the v1.4.0 milestone Nov 21, 2023
molinav added a commit that referenced this issue Nov 21, 2023
Solves GitHub issue #577.

The issue started appearing with `matplotlib` 3.5.0, older versions
of `matplotlib` were behaving as desired.
@molinav
Copy link
Member

molinav commented Nov 21, 2023

I am closing here, since the image showing issue should be fixed now. Thanks again, @YilongWang!

@molinav molinav closed this as completed Nov 21, 2023
@molinav molinav changed the title epoto failed to show with pseudocyl projection ETOPO failed to show with pseudocyl projection Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants