Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
TheXAxis
/YAxis
objects attached to anAxes
haveget_transform
andset_transform
methods, but unlike other getters/setters, you can't get the value you set.
Code for reproduction
importmatplotlibasmplimportmatplotlib.pyplotasplt_,ax=plt.subplots()xfm=mpl.scale.LogTransform(10)ax.xaxis.set_transform(xfm)print(ax.xaxis.get_transform())
Actual outcome
IdentityTransform()
Expected outcome
LogTransform(base=10, nonpositive='clip')
Additional information
I'm not sure if this is really a bug or if it's just a confusing / rough edge. The scale/transform API is fairly cumbersome, but improving that situation is a big project. Is the transform you set withaxis.set_transform
ever actually used? If not, then maybeset_transform
should not exist (or it should raise if called)?
Matplotlib Version
3.5.1