Closed donglx2018 closed 2 years ago
This is duplicated with #302. Please run your example with the newest version (not released yet): pip install git+https://github.com/lukelbd/proplot.git
This is duplicated with #302. Please run your example with the newest version (not released yet):
pip install git+https://github.com/lukelbd/proplot.git
Thanks, it works.
Note the newest proplot release 0.9.7 enforces a compatible matplotlib version when you install, and fixes some numpy dependency issues (#309). Sorry for not addressing this sooner.
Description
I tested the example of generating a surface plot from WRF output file on the web page (https://pratiman-91.github.io/2020/07/29/WRF-Surface-plot-using-Python.html).
Steps to reproduce
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you.
Expected behavior: [What you expected to happen] https://pratiman-91.github.io/uploads/2020/07/29/Fig1.png
Actual behavior: When the script is executed, the following error occurs. ββββββββββββββββββββββββ Traceback (most recent call last): File "test.py", line 33, in
m = axs.contourf(wrf.to_np(lons), wrf.to_np(lats), wrf.to_np(slp),
File "/opt/anaconda3/lib/python3.8/site-packages/proplot/axes/plot.py", line 1889, in _redirect_or_standardize
return func(self, args, kwargs) # call unbound method
File "/opt/anaconda3/lib/python3.8/site-packages/proplot/axes/plot.py", line 4320, in contourf
kw = self._parse_cmap(x, y, z, contour_plot=True, kw)
File "/opt/anaconda3/lib/python3.8/site-packages/proplot/internals/warnings.py", line 96, in _deprecate_kwargs
return func_orig(args, kwargs)
File "/opt/anaconda3/lib/python3.8/site-packages/proplot/axes/plot.py", line 2924, in _parse_cmap
norm, cmap, kwargs = self._parse_discrete(levels, norm, cmap, kwargs)
File "/opt/anaconda3/lib/python3.8/site-packages/proplot/axes/plot.py", line 2777, in _parse_discrete
norm = pcolors.DiscreteNorm(
File "/opt/anaconda3/lib/python3.8/site-packages/proplot/internals/warnings.py", line 96, in _deprecate_kwargs
return func_orig(*args, **kwargs)
File "/opt/anaconda3/lib/python3.8/site-packages/proplot/colors.py", line 2417, in init
self.vmin = vmin
File "/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colors.py", line 1148, in vmin
if value != self._vmin:
AttributeError: 'DiscreteNorm' object has no attribute '_vmin'
Proplot version
matplotlib version is 3.5.1 proplot version is 0.9.5