Title: proplot throws errors after upgrade · Issue #349 · proplot-dev/proplot · GitHub
Open Graph Title: proplot throws errors after upgrade · Issue #349 · proplot-dev/proplot
X Title: proplot throws errors after upgrade · Issue #349 · proplot-dev/proplot
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! ...
Open Graph 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 reall...
X 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 reall...
Opengraph URL: https://github.com/proplot-dev/proplot/issues/349
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"proplot throws errors after upgrade","articleBody":"### Description\r\n\r\nAfter 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.\r\n\r\n### Steps to reproduce\r\n\r\nimport proplot as plot\r\n\r\nimport numpy as np\r\n\r\nfig, axs = plot.subplots(axwidth=5, ncols=1, nrows=1)\r\na = axs.plot(np.linspace(0,100,100), np.linspace(0,100,100), '--', c='sapphire', label='Ni')\r\naxs.panel(side='b')\r\n\r\n**Expected behavior**\r\n\r\nA plot featuring a line, with an empty panel beneath it.\r\n\r\n**Actual behavior**: \r\n\r\nThrows following error:\r\n\r\n```\r\nAttributeError Traceback (most recent call last)\r\n\u003cipython-input-14-c30176304eae\u003e in \u003cmodule\u003e\r\n 3 fig, axs = plot.subplots(axwidth=5, ncols=1, nrows=1, share=0)\r\n 4 \r\n----\u003e 5 axs.panel(side='b', space=0.15)\r\n\r\n~/opt/anaconda3/lib/python3.7/site-packages/proplot/gridspec.py in _grid_command(self, *args, **kwargs)\r\n 1456 objs = []\r\n 1457 for ax in self:\r\n-\u003e 1458 obj = getattr(ax, name)(*args, **kwargs)\r\n 1459 objs.append(obj)\r\n 1460 return SubplotGrid(objs)\r\n\r\n~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/base.py in panel(self, *args, **kwargs)\r\n 1657 %(axes.panel)s\r\n 1658 \"\"\"\r\n-\u003e 1659 return self.panel_axes(*args, **kwargs)\r\n 1660 \r\n 1661 @docstring._snippet_manager\r\n\r\n~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/base.py in panel_axes(self, *args, **kwargs)\r\n 1670 if self._panel_parent:\r\n 1671 raise RuntimeError('Cannot create panels for existing panel axes.')\r\n-\u003e 1672 return self.figure._add_axes_panel(self, *args, **kwargs)\r\n 1673 \r\n 1674 def _add_frame(\r\n\r\n~/opt/anaconda3/lib/python3.7/site-packages/proplot/figure.py in _add_axes_panel(self, ax, side, **kwargs)\r\n 910 pax._panel_parent = ax\r\n 911 ax._panel_dict[side].append(pax)\r\n--\u003e 912 ax._auto_share()\r\n 913 axis = pax.yaxis if side in ('left', 'right') else pax.xaxis\r\n 914 getattr(axis, 'tick_' + side)() # set tick and tick label position\r\n\r\n~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/base.py in _auto_share(self)\r\n 1747 for iax in (self, *paxs[:-1]):\r\n 1748 iax._panel_sharex_group = True\r\n-\u003e 1749 iax._sharex_setup(bottom) # parent is bottom-most\r\n 1750 paxs = shared(self._panel_dict['top'])\r\n 1751 for iax in paxs:\r\n\r\n~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/cartesian.py in _sharex_setup(self, sharex, labels, limits)\r\n 583 # labels. But this is done after the fact -- tickers are still shared.\r\n 584 if level \u003e 1 and limits:\r\n--\u003e 585 self._sharex_limits(sharex)\r\n 586 \r\n 587 def _sharey_setup(self, sharey, *, labels=True, limits=True):\r\n\r\n~/opt/anaconda3/lib/python3.7/site-packages/proplot/axes/cartesian.py in _sharex_limits(self, sharex)\r\n 524 ax1.set_xlim(ax2.get_xlim()) # non-default limits\r\n 525 # Copy non-default locators and formatters\r\n--\u003e 526 self._shared_x_axes.join(self, sharex) # share limit/scale changes\r\n 527 if sharex.xaxis.isDefault_majloc and not self.xaxis.isDefault_majloc:\r\n 528 sharex.xaxis.set_major_locator(self.xaxis.get_major_locator())\r\n```\r\n\r\nAttributeError: 'CartesianAxesSubplot' object has no attribute '_shared_x_axes'\r\n\r\n### Proplot version\r\n\r\n3.5.1\r\n0.9.5\r\n","author":{"url":"https://github.com/dawnstrata","@type":"Person","name":"dawnstrata"},"datePublished":"2022-03-14T19:20:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/349/proplot/issues/349"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:728f8726-bfbf-bc79-e9bd-04b325b708b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDEE:2DE4CC:35A2A42:478B7BC:697AF415 |
| html-safe-nonce | 306dc9b36b62d7cb59cc2666b2a45b5bdc6c5aea1eb14c59bc11fc43e6ebb0e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREVFOjJERTRDQzozNUEyQTQyOjQ3OEI3QkM6Njk3QUY0MTUiLCJ2aXNpdG9yX2lkIjoiNTU4MjAzMzI0MTA1NDU3MzU4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 13fdfced8be0d90eb90e19bbae445cba068698d962e0226b5ceab71994be6e98 |
| hovercard-subject-tag | issue:1168804683 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/proplot-dev/proplot/349/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cc52ee779a8acbc1852af2495077b30605a45cc1c98d862a3fccb852b915dd90/proplot-dev/proplot/issues/349 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cc52ee779a8acbc1852af2495077b30605a45cc1c98d862a3fccb852b915dd90/proplot-dev/proplot/issues/349 |
| og:image:alt | 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 reall... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dawnstrata |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7ce8ed0a54c4730aeca4e6abacfc6490365fc42e25480b86883054df3f9181c8 |
| turbo-cache-control | no-preview |
| go-import | github.com/proplot-dev/proplot git https://github.com/proplot-dev/proplot.git |
| octolytics-dimension-user_id | 108025793 |
| octolytics-dimension-user_login | proplot-dev |
| octolytics-dimension-repository_id | 113293661 |
| octolytics-dimension-repository_nwo | proplot-dev/proplot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 113293661 |
| octolytics-dimension-repository_network_root_nwo | proplot-dev/proplot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d7bfc78137af9a4828305e52ab993fce981d7085 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width