[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re 2 Y Axes
From: |
cctsim |
Subject: |
Re 2 Y Axes |
Date: |
Wed, 11 Jun 2003 00:13:31 +0100 (BST) |
On Tuesday 10 June 2003 20:54, Quentin Spencer wrote:
> Has anyone ever made a plot with 2 Y axes (where one scale is printed on
> the left and the other on the right)? This would be very convenient for
> combining data from 2 plots onto one plot. I don't even know if MATLAB
> supports this. Does anyone know whether gnuplot does?
>
> --Quentin
That's my approach but there might be an easier way to do it.
n=linspace(0,2*pi,201).';
data1=[n sin(2*pi*n)];
data2=[n sin(2*pi*n).^2];
gset xrange [0:2*pi]
gset yrange [-1:1]
gset ytics nomirror
gset y2range [0:1]
gset y2tics 0, 0.2
gplot data1 with lines axis x1y1, data2 with lines axis x1y2
Regards
cctsim
__________________________________________________
Yahoo! Plus - For a better Internet experience
http://uk.promotions.yahoo.com/yplus/yoffer.html
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |