matplotlib / basemap

Plot on map projections (with coastlines and political boundaries) using matplotlib
MIT License
772 stars 390 forks source link

ETOPO failed to show with pseudocyl projection #577

Closed YilongWang closed 8 months ago

YilongWang commented 1 year ago

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 "fillcolor='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 lon0 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 commented 1 year ago

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 commented 8 months ago

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 commented 8 months ago

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