On Tue, May 4, 2010 at 6:27 PM, Nico Schlömer <nico.schloe...@gmail.com> wrote:
> That's really independent of whether the grid is on or off.
>
> Is there any explanation for it that does not have to do with Harry
> Potter or the Jedi? ;)
>

positions of gridlines (and ticks, ticklabels, etc) are updated during
the drawing time (when the figure is drawn). Thus, the coordinates of
lines returned by gca().get_xgridlines() are sometimes meaningless and
you have to be careful about using this (it is best not to pay
attention). However, other artist-related attributes, e.g., line
colors etc, are respected.

Whether gridlines are on or off is actually controlled by each tick.
For example,

for t in gca().xaxis.majorTicks:
  print t.gridOn


A status of the gridlines is also kept in the axis-level.

print gca().xaxis._gridOnMajor

Regards,

-JJ

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to