Specifiying Axes and Grid Lines

I've read the users guide and API (both as pdf and on the web site), and
do not see how to configure the axes for only left and bottom, and the grid
for only horizontal lines.

   The axes(rect, w) is used to specify the position of the left and bottom
lines plus the width and height of the box. What do I put in
~/.matplotlib/matplotlibrc to specify no top or right axes, and no vertical
grid lines?

Rich

···

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863

Rich Shepard wrote:

   I've read the users guide and API (both as pdf and on the web site), and
do not see how to configure the axes for only left and bottom, and the grid
for only horizontal lines.

   The axes(rect, w) is used to specify the position of the left and bottom
lines plus the width and height of the box. What do I put in
~/.matplotlib/matplotlibrc to specify no top or right axes, and no vertical
grid lines?

Rich

Sorry, but those options are not presently available at the rc level. Mpl simply does not have easy support for that style of plot. It is on the wish list.

Here is one way of turning off vertical grid lines:

xgl = ax.xaxis.get_gridlines()
for l in gl:
     l.set_visible(False)

To get rid of the upper and right sides of the box I think you would have to do something like "box('off')" and then use hline and vline calls or methods to manually put in the lower and left boundaries.

Eric

Sorry, but those options are not presently available at the rc level. Mpl simply does not have easy support for that style of plot. It is on the wish list.

Eric,

   I'm surprised because this is quite common ... at least in my needs over
the years.

To get rid of the upper and right sides of the box I think you would have
to do something like "box('off')" and then use hline and vline calls or
methods to manually put in the lower and left boundaries.

   I use:

   p.p.box(on=False)
   p.axhline(linewidth=1, xmin=0, color='black')
   p.axvline(linewidth=1, ymin=0, color='black')

but the frameless display now has negative values (x = -10, y = -0.2) when
the scales should be x = [0, 50] and y = [0.0, 1.0].

   I want to learn how to get these correct before addressing the grid lines.
Actually, I can turn off the grid lines and use axhline for each one I want.

Thanks,

Rich

···

On Thu, 20 Mar 2008, Eric Firing wrote:

--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863