Yes. You can do
from pylab import *
...
axes().grid(True) # For both axes
axes().xaxis.grid(True) # Just x
axes().yaxis.grid(True) # Just y
Rather than just an on/off boolean, you can also provide line styles:
axes().grid(color='r', linestyle='-', linewidth=2)
Cheers,
Mike
Rich Shepard wrote:
> Two questions relating to the display of grid lines in a plot:
>
> 1) Can this be controlled programmatically rather than from within
> ~/.matplotlib/matplotlibrc?
>
> 2) Is there a way to display horizontal grid lines without vertical grid
> lines?
>
> Pointers to the docs where these questions are answered would be adequate.
>
> Rich
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users