On 8/21/07, Torsten Hahn <tor...@gm...> wrote:
> The problem is, that there only the major ticklines are returned by
> ax.get_xticklines(). How do i access (and modify) the minor ticklines?
In [80]: for tick in ax.xaxis.get_major_ticks():
print tick.tick1line, tick.tick2line
....:
Line2D((0,0)) Line2D((0,1))
Line2D((0,0)) Line2D((0,1))
Line2D((0,0)) Line2D((0,1))
Line2D((0,0)) Line2D((0,1))
Line2D((0,0)) Line2D((0,1))
Line2D((0,0)) Line2D((0,1))
In [82]: for tick in ax.xaxis.get_minor_ticks():
print tick.tick1line, tick.tick2line
....:
for the xaxis, tick1line is the left tick, tick2line is the right
tick. for the y axis they are the bottom and top.
Here is the help on the tick attrs:
In [85]: from matplotlib.axis import Tick
In [87]: print Tick.__doc__
Abstract base class for the axis ticks, grid lines and labels
1 refers to the bottom of the plot for xticks and the left for yticks
2 refers to the top of the plot for xticks and the right for yticks
Publicly accessible attributes
tick1line : a Line2D instance
tick2line : a Line2D instance
gridline : a Line2D instance
label1 : a Text instance
label2 : a Text instance
gridOn : a boolean which determines whether to draw the tickline
tick1On : a boolean which determines whether to draw the 1st tickline
tick2On : a boolean which determines whether to draw the 2nd tickline
label1On : a boolean which determines whether to draw tick label
label2On : a boolean which determines whether to draw tick label
|