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.
On Wed, Aug 27, 2008 at 3:12 PM, Uri Laserson <laserson@...> 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?
> On Wed, Aug 27, 2008 at 14:38, Jae-Joon Lee <lee.j.joon@...> 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()
>> 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, = ax.plot([0,1],[0,0], "k-", transform=ax.transAxes)
>> You may consider to use a custom axes class by Tony.
>> On Tue, Aug 26, 2008 at 10:35 PM, Uri Laserson <laserson@...> 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@...
>> > -------------------------------------------------------------------------
>> > 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@...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> Uri Laserson
> PhD Candidate, Biomedical Engineering
> Harvard Medical School (Genetics)
> Massachusetts Institute of Technology (Mathematics)
> phone +1 917 742 8019