Latest proplot version incompatible with matplotlib 3.5
Description
I think v0.9.5 might be incompatible with matplotlib 3.5.0. I installed from conda-forge so we can repin.
Steps to reproduce
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you.
# your code here
# we should be able to copy-paste this into python and exactly reproduce your bug
fig, axs = pplt.subplots(nrows=3, ncols=3)
Expected behavior: [What you expected to happen]
A plot without a traceback?
Actual behavior: [What actually happened]
An error.
>>> import proplot as pplt
/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/__init__.py:71: ProplotWarning: Rebuilding font cache. This usually happens after installing or updating proplot.
register_fonts(default=True)
>>> fig, axs = pplt.subplots(nrows=3, ncols=3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/ui.py", line 192, in subplots
axs = fig.add_subplots(*args, **kwsubs)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/figure.py", line 1362, in add_subplots
axs[idx] = self.add_subplot(ss, **kw)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/figure.py", line 1248, in add_subplot
ax = super().add_subplot(ss, _subplot_spec=ss, **kwargs)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/matplotlib/figure.py", line 772, in add_subplot
ax = subplot_class_factory(projection_class)(self, *args, **pkw)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/matplotlib/axes/_subplots.py", line 34, in __init__
self._axes_class.__init__(self, fig, [0, 0, 1, 1], **kwargs)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/axes/cartesian.py", line 338, in __init__
super().__init__(*args, **kwargs)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/axes/plot.py", line 1260, in __init__
super().__init__(*args, **kwargs)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/axes/base.py", line 783, in __init__
self._auto_share()
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/axes/base.py", line 1777, in _auto_share
child._sharey_setup(parent)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/axes/cartesian.py", line 605, in _sharey_setup
self._sharey_limits(sharey)
File "/Users/beckermr/miniconda3/envs/test-pp/lib/python3.10/site-packages/proplot/axes/cartesian.py", line 548, in _sharey_limits
self._shared_y_axes.join(self, sharey) # share limit/scale changes
AttributeError: 'CartesianAxesSubplot' object has no attribute '_shared_y_axes'. Did you mean: '_shared_axes'?
Equivalent steps in matplotlib
Please try to make sure this bug is related to a proplot-specific feature. If you're not sure, try to replicate it with the native matplotlib API. Matplotlib bugs belong on the matplotlib github page.
# your code here, if applicable
import matplotlib.pyplot as plt
Proplot version
Paste the results of import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)here.
>>> import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)
3.5.0
0.9.5
I think we should add a new upper bound on conda-forge maybe?
I should get to a full 3.5 compatibility release ~~by the end of the year~~ soon, but for the time being I'll keep this issue pinned.
(For those reading this thread -- to use proplot, please either downgrade matplotlib to version 3.4.3 until this issue is closed, or install the development version with pip install git+https://github.com/lukelbd/proplot).
Thank you!
Just got this error too. Please add the matlab version to the pip package as a requirement?
Was this issue closed? In its stable version, I still cannot use matplotlib when its version is higher than 3.4.3
I just submitted a release v0.9.7 to pypi that updates v0.9.5 with the requirement matplotlib>=3.3.0,<3.5.0 and addresses numpy's deprecation of python-type aliases like np.int (v0.9.6 didn't include the numpy fixes). Now pip install proplot should enforce a compatible matplotlib version, as I think conda install proplot already does.
Originally I was hoping to do the v0.10.0 release that adds matplotlib 3.5.X compatibility + other fixes/improvements/tests. But obviously the above timeline didn't work out -- I've had to take another hard step back from proplot as I finish my PhD.
I still personally use proplot every day in my work, and I plan to continue using it throughout my career, so I have no plans to abandon this project. Should finally have time to work on proplot this late spring/summer, and I'm looking into funding sources + options for building more of a community around this project (i.e., not just me -- hence the move to the "proplot-dev" organization) so that development can be less erratic going forward.
i really love proplot and i am very happy to see the update.