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
LogNorm colormap doesn't work correctly #25
Comments
Thanks for posting this, it triggered a much-needed cleanup of import proplot as plot
import xarray as xr
import numpy as np
%matplotlib inline
ds = xr.open_dataarray('/Users/ldavis/tmp/chl_cal.nc')
f, ax = plot.subplots(proj='pcarree', tight=False, axwidth=6, colorbar='r')
p = ax.pcolormesh(ds.lon, ds.lat, ds.values, norm='log', levels=15)
# p = ax.contourf(ds.lon, ds.lat, ds.values, norm='log', levels=15) # also works!
ax.set_extent([-140, -105, 20, 50])
f.rightpanel.colorbar(p) Now the By the way it looks like you still have that issue with thin fonts? If you run
and restart IPython it should fix the issue. Font control in matplotlib is really tricky, for now I have to add font files directly to the matplotlib data folder but am considering changing this. Also keep in mind one of the big things with ProPlot is you no longer have to refer to these verbose class names (e.g. And now I'm going to sleep. |
This is awesome, thanks @lukelbd. Resulting plot from this update is going on my poster I'm working on. Thanks also for the |
Using the
LogNorm
colormap argument in, e.g.,pcolormesh
doesn't work correctly inproplot
.Data link: http://s000.tinyupload.com/index.php?file_id=02946064711977690771
With matplotlib:
With proplot:
Here's a workaround, but I think using
LogNorm
is preferred so it handles the labeling and all that for you. Now this is of course in actual log10 units.The text was updated successfully, but these errors were encountered: