help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

y2 plot from octave


From: Stephen Eglen
Subject: y2 plot from octave
Date: Sat, 7 Aug 1999 20:45:15 +0100 (BST)

> Hi in gnuplot, there are a number of commands for 2D plots with two
> y axes (y2data, y2label, etc.) Does anybody know how to use this
> feature from octave?? (if possible, a small example code, please).

Hi, 
the following should work (at least with gnuplot 3.7)

will plot f(x) = x and f(x) = x^2


x=[0:0.5:10];
arr = [x; x; x.^2]';
gset y2tics on
gset ylabel "y=x"; gset y2label "y=x^2"
gplot arr using 1:2, arr using 1:3 axes x1y2

Cheers, Stephen



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]