-
Notifications
You must be signed in to change notification settings - Fork 103
Description
Description
After upgrading proplot, I get errors when trying to do some simple things. The main issue is encountered upon making panels. The panel displays in output but with an error. Would really appreciate advice on how to fix this! I have looked at some previous posts here and have already tried updating matplotlib and proplot together, with no change in behavior.
Steps to reproduce
import proplot as plot
import numpy as np
fig, axs = plot.subplots(axwidth=5, ncols=1, nrows=1)
a = axs.plot(np.linspace(0,100,100), np.linspace(0,100,100), '--', c='sapphire', label='Ni')
axs.panel(side='b')
Expected behavior
A plot featuring a line, with an empty panel beneath it.
Actual behavior:
Throws following error:
AttributeError Traceback (most recent call last)
<ipython-input-14-c30176304eae> in <module>
3 fig, axs = plot.subplots(axwidth=5, ncols=1, nrows=1, share=0)
4
----> 5 axs.panel(side='b', space=0.15)
~/opt/anaconda3/lib/python3.7/site-packages/proplot/gridspec.py in _grid_command(self, *args, **kwargs)
1456 objs = []
1457 for ax in self:
-> 1458 obj = getattr(ax, name)(*args, **kwargs)
1459 objs.append(obj)
1460 return SubplotGrid(objs)
~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/base.py in panel(self, *args, **kwargs)
1657 %(axes.panel)s
1658 """
-> 1659 return self.panel_axes(*args, **kwargs)
1660
1661 @docstring._snippet_manager
~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/base.py in panel_axes(self, *args, **kwargs)
1670 if self._panel_parent:
1671 raise RuntimeError('Cannot create panels for existing panel axes.')
-> 1672 return self.figure._add_axes_panel(self, *args, **kwargs)
1673
1674 def _add_frame(
~/opt/anaconda3/lib/python3.7/site-packages/proplot/figure.py in _add_axes_panel(self, ax, side, **kwargs)
910 pax._panel_parent = ax
911 ax._panel_dict[side].append(pax)
--> 912 ax._auto_share()
913 axis = pax.yaxis if side in ('left', 'right') else pax.xaxis
914 getattr(axis, 'tick_' + side)() # set tick and tick label position
~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/base.py in _auto_share(self)
1747 for iax in (self, *paxs[:-1]):
1748 iax._panel_sharex_group = True
-> 1749 iax._sharex_setup(bottom) # parent is bottom-most
1750 paxs = shared(self._panel_dict['top'])
1751 for iax in paxs:
~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/cartesian.py in _sharex_setup(self, sharex, labels, limits)
583 # labels. But this is done after the fact -- tickers are still shared.
584 if level > 1 and limits:
--> 585 self._sharex_limits(sharex)
586
587 def _sharey_setup(self, sharey, *, labels=True, limits=True):
~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/cartesian.py in _sharex_limits(self, sharex)
524 ax1.set_xlim(ax2.get_xlim()) # non-default limits
525 # Copy non-default locators and formatters
--> 526 self._shared_x_axes.join(self, sharex) # share limit/scale changes
527 if sharex.xaxis.isDefault_majloc and not self.xaxis.isDefault_majloc:
528 sharex.xaxis.set_major_locator(self.xaxis.get_major_locator())
AttributeError: 'CartesianAxesSubplot' object has no attribute '_shared_x_axes'
Proplot version
3.5.1
0.9.5