SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Robin <ro...@gm...> - 2008年11月28日 13:09:21
Hi,
I have a plot containing two lines that are quite far apart - ie one
line oscillates around y=2, the other around y=10. The osciallations
are small, but I would like to show the detail better (while having
htem in a single plot).
So I thought it would be nice if the y-axis scale went from 1-3 then
had a break (denoted with some kind of cross mark), then went from
9-11. I tried googling but I'm not really sure what the official name
for such a thing is, if there is one.
Is it possible to get this sort of effect with matplotlib? Or can
people suggest an alternative (I guess I will look at doing 2 subplots
one above the other very close together).
Cheers
Robin
From: Ben G. <bg...@gm...> - 2008年11月28日 22:25:52
If I'm not mistaken, you might be able to write a Transform
(http://matplotlib.sourceforge.net/devel/transformations.html) to do
this, although I'm not sure how you'd render the split-mark. I don't
really know these things though, just a thought.
- Ben
On Fri, 2008年11月28日 at 13:09 +0000, Robin wrote:
> Hi,
> 
> I have a plot containing two lines that are quite far apart - ie one
> line oscillates around y=2, the other around y=10. The osciallations
> are small, but I would like to show the detail better (while having
> htem in a single plot).
> 
> So I thought it would be nice if the y-axis scale went from 1-3 then
> had a break (denoted with some kind of cross mark), then went from
> 9-11. I tried googling but I'm not really sure what the official name
> for such a thing is, if there is one.
> 
> Is it possible to get this sort of effect with matplotlib? Or can
> people suggest an alternative (I guess I will look at doing 2 subplots
> one above the other very close together).
> 
> Cheers
> 
> Robin
> 
> -------------------------------------------------------------------------
> 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: Eric F. <ef...@ha...> - 2008年11月29日 02:21:11
Robin wrote:
> Hi,
> 
> I have a plot containing two lines that are quite far apart - ie one
> line oscillates around y=2, the other around y=10. The osciallations
> are small, but I would like to show the detail better (while having
> htem in a single plot).
I suggest using twinx(); the scale for one line will be on the left, the 
scale for the other on the right. You can make the scale colors match 
the line colors, if you want to. I just updated 
examples/api/two_scales.py to show this.
Eric
> 
> So I thought it would be nice if the y-axis scale went from 1-3 then
> had a break (denoted with some kind of cross mark), then went from
> 9-11. I tried googling but I'm not really sure what the official name
> for such a thing is, if there is one.
> 
> Is it possible to get this sort of effect with matplotlib? Or can
> people suggest an alternative (I guess I will look at doing 2 subplots
> one above the other very close together).
> 
> Cheers
> 
> Robin
> 
> -------------------------------------------------------------------------
> 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: Alan G I. <ai...@am...> - 2008年11月29日 09:26:03
On 11/28/2008 9:21 PM Eric Firing apparently wrote:
> I suggest using twinx(); the scale for one line will be on the left, the 
> scale for the other on the right. You can make the scale colors match 
> the line colors, if you want to. I just updated 
> examples/api/two_scales.py to show this.
Hmmm, not here:
http://matplotlib.sourceforge.net/examples/api/two_scales.html
And here the test on the y-axes does not display properly on the
posted figures.
But I like the idea.
Alan Isaac
`
From: Eric F. <ef...@ha...> - 2008年11月29日 18:08:44
Attachments: two_scales.py
Alan G Isaac wrote:
> On 11/28/2008 9:21 PM Eric Firing apparently wrote:
>> I suggest using twinx(); the scale for one line will be on the left, the 
>> scale for the other on the right. You can make the scale colors match 
>> the line colors, if you want to. I just updated 
>> examples/api/two_scales.py to show this.
> 
> 
> Hmmm, not here:
> http://matplotlib.sourceforge.net/examples/api/two_scales.html
The web page docs don't get updated automatically every time svn 
changes--which is probably a good thing. The revised example is attached.
> And here the test on the y-axes does not display properly on the
> posted figures.
That's puzzling. It looks like some odd rcParams settings must have 
been used when the figures were generated for the web page.
Eric
> 
> But I like the idea.
> 
> Alan Isaac
> 
> `
> 
> 
> 
> -------------------------------------------------------------------------
> 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: Alan G I. <ai...@am...> - 2008年12月01日 01:39:56
On 11/29/2008 1:08 PM Eric Firing apparently wrote:
 > for tl in ax2.get_yticklabels():
 > tl.set_color('r')
Obvious once you see it.
Nice.
Alan Isaac
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 によって変換されたページ (->オリジナル) /