We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When plotting multiple data arrays into the same MPL Axes, the axes limits are replaced. E.g.,
import scipp as sc import matplotlib.pyplot as plt a = sc.DataArray(sc.ones(sizes={'x': 3}), coords={'x': sc.arange('x', 3)}) b = 10 * a fig, ax = plt.subplots() a.plot(ax=ax) b.plot(ax=ax)
produces that is, the points of a are not visible.
a
I would expect this to behave more like MPL where we can use ax.plot multiple times and get limits that encompass all data.
ax.plot
The text was updated successfully, but these errors were encountered:
This is probably because it's difficult to keep everyone happy.
It comes from the fact that when doing b.plot(ax=ax), the figure created there is unaware of what was done to ax before. In your case, you can either
b.plot(ax=ax)
ax
fig, ax = plt.subplots() a.plot(ax=ax) b.plot(ax=ax) ax.autoscale()
or use
import plopp as pp pp.plot({'a': a, 'b': b})
Sorry, something went wrong.
@jl-wynen do you still want to modify the behaviour or are the suggested fixes above enough?
In principle they are enough. I just find it surprising that it behaves differently from plain matplotlib.
No branches or pull requests
When plotting multiple data arrays into the same MPL Axes, the axes limits are replaced. E.g.,
produces
that is, the points of
a
are not visible.I would expect this to behave more like MPL where we can use
ax.plot
multiple times and get limits that encompass all data.The text was updated successfully, but these errors were encountered: