8000 Pandas plot method incompatibility. · Issue #40 · bendichter/brokenaxes · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Pandas plot method incompatibility. #40
Open
@juseg

Description

@juseg

Pandas plot methods seem to fail on broken axes. Here is a minimalist example:

import pandas as pd
from brokenaxes import brokenaxes
ts = pd.Series(range(10)).plot(ax=brokenaxes())

And the error traceback:

Traceback (most recent call last):
  File "./baxbug.py", line 10, in <module>
    ts= pd.Series(range(10)).plot(ax=brokenaxes())
  File "/usr/lib/python3.7/site-packages/pandas/plotting/_core.py", line 794, in __call__
    return plot_backend.plot(data, kind=kind, **kwargs)
  File "/usr/lib/python3.7/site-packages/pandas/plotting/_matplotlib/__init__.py", line 62, in plot
    plot_obj.generate()
  File "/usr/lib/python3.7/site-packages/pandas/plotting/_matplotlib/core.py", line 281, in generate
    self._make_plot()
  File "/usr/lib/python3.7/site-packages/pandas/plotting/_matplotlib/core.py", line 1043, in _make_plot
    if self._is_ts_plot():
  File "/usr/lib/python3.7/site-packages/pandas/plotting/_matplotlib/core.py", line 1035, in _is_ts_plot
    return not self.x_compat and self.use_index and self._use_dynamic_x()
  File "/usr/lib/python3.7/site-packages/pandas/plotting/_matplotlib/core.py", line 1040, in _use_dynamic_x
    return _use_dynamic_x(self._get_ax(0), self.data)
  File "/usr/lib/python3.7/site-packages/pandas/plotting/_matplotlib/core.py", line 686, in _get_ax
    ax.get_yaxis().set_visible(True)
AttributeError: 'CallCurator' object has no attribute 'get_yaxis'

On can work around the issue using brokenaxes().plot(...).
Using pandas 0.25.1 and pip-installed brokenaxes (from 18 Oct. 2019) - Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0