You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These two method calls should perform the same log scaling action. However, the output from xaxis.set_scale('log') behaves differently. See the attached figures for the difference. I am guessing yaxis counterparts behave the same way.
The axis.Axis.set_scale is used by Axes.set_xscale. It looks like set_scale should really be an internal function.
set_xscale calls self.xaxis.set_scale and then self._update_transscale which then gets the scale back from the x and y axis objects and uses the results to update the transform the objects in self.lines use to draw them selves.
Yeah -- I think Axis.set_scale really should be private. Of course, some may be using it, so we'll have to retain a public wrapper around it that throws a deprecation warning for a while.
Activity
pelson commentedon Mar 29, 2013
I'm not so sure. If they're supposed to do the same thing, why bother having two of them?
For my own reference, the two relevant bits in the documentation: http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.set_xscale and http://matplotlib.org/api/axis_api.html#matplotlib.axis.Axis.set_scale (
set_scaleis not documented)Any comments @mdboom?
tacaswell commentedon Mar 30, 2013
The
axis.Axis.set_scaleis used byAxes.set_xscale. It looks likeset_scaleshould really be an internal function.set_xscalecallsself.xaxis.set_scaleand thenself._update_transscalewhich then gets the scale back from the x and y axis objects and uses the results to update the transform the objects inself.linesuse to draw them selves.mdboom commentedon Apr 1, 2013
Yeah -- I think
Axis.set_scalereally should be private. Of course, some may be using it, so we'll have to retain a public wrapper around it that throws a deprecation warning for a while.Addresses fixes matplotlib#1871 by making `axis.set_scale` private an…