SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Uri L. <las...@mi...> - 2008年08月27日 02:35:19
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
las...@mi...
From: Mathieu L. <lep...@gm...> - 2008年08月27日 11:20:20
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 <las...@mi...> 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
> las...@mi...
>
> -------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Jae-Joon L. <lee...@gm...> - 2008年08月27日 18:39:01
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 <las...@mi...> 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
> las...@mi...
>
> -------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Jae-Joon L. <lee...@gm...> - 2008年08月27日 19:36:09
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 <las...@mi...> 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...@gm...> 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 <las...@mi...> 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
>> > las...@mi...
>> >
>> >
>> > -------------------------------------------------------------------------
>> > 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
>> > Mat...@li...
>> > 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
> las...@mi...
>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /