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
with matplotlib >= 1.3 i see the following behavior:
In [6]: s = [200, 500]
In [7]: fig = figure()
In [8]: ax = fig.add_subplot(111)
In [10]: ax.bar([0, 1], s, log=True, bottom=1)
Out[10]: <Container object of 2 artists>
In [12]: ax.yaxis.get_ticklocs()
Out[12]: array([ 0.1, 1. , 10. , 100. , 1000. , 10000. ])
In [15]: [x.get_text() for x in ax.yaxis.get_ticklabels()]
Out[15]:
['',
'$\\mathdefault{10^{0}}$',
'$\\mathdefault{10^{1}}$',
'$\\mathdefault{10^{2}}$',
'$\\mathdefault{10^{3}}$',
'']
The corresponding plot is:
Why are there empty tick labels and tick locs that aren't actually in the plot? Am I missing something? I don't observe this behavior in 1.2.1
In [7]: [x.get_text() for x in ax.yaxis.get_ticklabels()]
Out[7]:
['$\\mathdefault{10^{0}}$',
'$\\mathdefault{10^{1}}$',
'$\\mathdefault{10^{2}}$',
'$\\mathdefault{10^{3}}$']
In [8]: ax.yaxis.get_ticklocs()
Out[8]: array([ 1., 10., 100., 1000.])
In [10]: matplotlib.__version__
Out[10]: '1.2.1'
The text was updated successfully, but these errors were encountered:
commit 4c0f3f3
Author: Daniel Hyams <dhyams@gitdev.(none)>
Date: Sat Jan 19 19:14:03 2013 -0500
Modifications to MultipleLocator and LogLocator, so that the locators will
give locations one past what they really need to. This is necessary, because
in situations where round off error matters, we want the locator to offer
more that it really thinks it needs to. The clipping of ticks still takes
place in the Axis class, so it's perfectly fine to add more locs than necessary.
In fact, matplotlib relies on the clipping behavior in the Axis class already
to not draw ticks outside of the limits of the axis.
with matplotlib >= 1.3 i see the following behavior:
The corresponding plot is:
Why are there empty tick labels and tick locs that aren't actually in the plot? Am I missing something? I don't observe this behavior in 1.2.1
The text was updated successfully, but these errors were encountered: