Peter Buschman-2 wrote:
>
>
> I ended up finding a solution to this by using a FixedLocator and
> manually setting each of the tick
> positions for both major and minor grids without overlap.
>
> I'm not sure if this is the recommended way to do this, but hey, it worked
> ;-)
>
> for tick in range(seconds+1)[1:]:
> if tick % major_multiple == 0:
> xmajorticks.append(tick)
> elif tick % minor_multiple == 0:
> xminorticks.append(tick)
>
> ax.xaxis.set_major_locator(FixedLocator(xmajorticks))
> ax.xaxis.set_minor_locator(FixedLocator(xminorticks))
>
>
Hi there,
I know this is an old post, but I'm also trying to do something similar, but
using different linestyles for the major and minor grids.
Has anyone figured out code that's more efficient than this? It seems that
this can slow down my application's data "load time". Also, since I'm using
the zoom widget, I'm not certain if this will work if the tick markers
change If I change my x limits... Any thoughts?
-----
Krishna Adrianto Pribadi
Test Engineer
Harley-Davidson Motor Co.
Talladega Test Facility
Vehicle Test Stands
--
View this message in context:
http://old.nabble.com/Setting-color-of-both-major-and-minor-gridlines--tp9475256p28367421.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users