axis formatting

Hi Uri,

What version of matplotlib are you using? I guess the get_frame()
method is deprecated (but still available) in the recent version of
matplotlib. Instead, frame and patch attributes can be used.

I only started looking into the code behind the matplotlib recently so
I don't know much about how it can be handled in the older version. I
suggest you upgrade to the recent version of matplotlib if possible.
Or you may wait for others to answer.

I'll send you Tony's class in a separate email. But I'm not sure if it
will work with older versions.
Regards,

-JJ

ยทยทยท

On Wed, Aug 27, 2008 at 3:12 PM, Uri Laserson <laserson@...1166...> wrote:

Hi JJ,

Thanks for the suggestion...I think we are close. First, the AxesSubplot
object which is returned from ax=gca() does not have a 'frame'
object/attribute. However, ax.get_frame() gives me a rectangle object, but
when I call the set_visible(False) method, it turns the background gray
while leaving all the axes in place (the inverse behavior of what you said
below). Any idea how to reverse this?

Also, the link to the attachment for Tony's class is broken. Any idea where
I could get the file?

Thanks!
Uri

On Wed, Aug 27, 2008 at 14:38, Jae-Joon Lee <lee.j.joon@...287...> wrote:

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
>
>

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