From: Michael D. <md...@st...> - 2007-11-27 17:46:19
|
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 |