SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: James B. <jb...@cf...> - 2007年05月30日 22:24:24
Hello,
(for a 2-d plot)
Any example code of how to label the 2nd y-axis using a different scale
than the first y-axis for the same dataset?
For example, how do you make a plot of distances with the left y-axis in
kilometers and the right y-axis in miles?
Thanks in advance for your help,
James
From: Jeff W. <js...@fa...> - 2007年05月30日 22:45:06
James Battat wrote:
> Hello,
>
> (for a 2-d plot)
> Any example code of how to label the 2nd y-axis using a different scale
> than the first y-axis for the same dataset?
>
> For example, how do you make a plot of distances with the left y-axis in
> kilometers and the right y-axis in miles?
>
> Thanks in advance for your help,
> James
> 
James: Use twinx - as demonstrated in thee 'two_scales.py' example.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
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 によって変換されたページ (->オリジナル) /