On 8/21/07, Torsten Hahn <[EMAIL PROTECTED]> 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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to