-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
No link to shared axes for Axis.set_units #10304
New issue
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
Comments
Units support are a bit inconsistent. Does See #9713 |
@jklymak, astropy provides a |
It seems the Matplotlib should consider using a minimal units system for testing. We have one in ax.xaxis.set_units(cm)
ax.plot(x * cm, x)
ax.xaxis.set_units(m)
plt.show() I'd expect to see things plotted in meters, but the conversion happens when
on that axis? This'll all take a bit of thought to do correctly, and maybe when JPL originally did this, they put the thought in, but subsequently its no longer as cohesive. |
Bug report
Bug summary
The
Axis.set_units
method does not emit to linked axes in the same way thatAxes.set_xlim
does (by default).Code for reproduction
Actual outcome
Expected outcome
If
set_units
was linked to all shared axes, I would expect the call out toax1.yaxis.set_units
to also operate onax2
.This is probably best exposed via new
set_xunits
andset_yunits
methods for theAxes
object, that include anemit=True
keyword to useself._shared_x_axes.get_siblings
in the same way asAxes.set_{x,y}lim
.Matplotlib version
print(matplotlib.get_backend())
): 'agg'all installed with macports.
The text was updated successfully, but these errors were encountered: