axis formatting

Hi,

Is it possible to create plots that only have a single x-axis on the bottom and a single y-axis on the left, while suppressing an upper or right axis (i.e., have the graph be “open”)?

Thanks!
Uri

···


Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019

laserson@…1166…

Uri,

You could look have a look at :

gca().xaxis.tick_bottom()
gca().yaxis.tick_left()

or hide the frame :

ax = axes( FrameOne=False )

Hope this helps.

···

On Tue, Aug 26, 2008 at 11:35 PM, Uri Laserson <laserson@...1166...> wrote:

Hi,

Is it possible to create plots that only have a single x-axis on the bottom
and a single y-axis on the left, while suppressing an upper or right axis
(i.e., have the graph be "open")?

Thanks!
Uri

--
Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019
laserson@...1166...

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

You can suppress the tick marks on the top and right axis as Mathieu
suggested. Setting frame_on as False will suppresse both the bounding
lines and the white background patch of the axes. You can suppress
only the bounding lines by

ax = gca()
ax.frame.set_visble(False)

Note that this will delete not only the top and the right axis lines
but also the bottom and the left ones.
Therefore, you need to manually draw the axis lines (bottom and left).

p, = ax.plot([0,0],[0,1], "k-", transform=ax.transAxes)
p.set_clip_on(False)
p, = ax.plot([0,1],[0,0], "k-", transform=ax.transAxes)
p.set_clip_on(False)

You may consider to use a custom axes class by Tony.

http://thread.gmane.org/gmane.comp.python.matplotlib.general/13619

Regards,

-JJ

···

On Tue, Aug 26, 2008 at 10:35 PM, Uri Laserson <laserson@...1166...> wrote:

Hi,

Is it possible to create plots that only have a single x-axis on the bottom
and a single y-axis on the left, while suppressing an upper or right axis
(i.e., have the graph be "open")?

Thanks!
Uri

--
Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019
laserson@...1166...

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options