help-octave
[Top][All Lists]
Advanced

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

Re: multiple plotyy fails.


From: Doug Stewart
Subject: Re: multiple plotyy fails.
Date: Mon, 11 May 2015 08:46:46 -0400



On Mon, May 11, 2015 at 8:19 AM, KITAKAWA Akio <address@hidden> wrote:
Hi all,

I use Octave 3.8.2 with gnuplot  4.6 patchlevel 4 on Ubuntu. I'm in trouble using multiple plotyy.

 I want to plot 4 sets of data of one figure by plotyy. But  codes like
plotyy(x,y1,x,y2);
hold on
plotyy(x,y3,x,y4);

fail to produce expected results.

Example code is as follows:

x=1:10;
y1 = rand(1,10);
y2 = rand(1,10)*10;
y3 = rand(1,10);
y4 = rand(1,10)*10;
plotyy(x,y1,x,y2);
hold on
[ax,h1,h2]=plotyy(x,y3,x,y4);
set(h1,"linestyle","none","marker","o");
set(h2,"linestyle","none","marker",">");

It seems that the line of y2 (The second data set plotted by first plotyy)
disappeared (or is covered or overwritten by the y4 plot?).

Is this a bug or are there any misuse of functions in my code?


_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave


using octave 4.0.0 RC4 and this code it works correctly. I get 4 lines and the last 2 have the symbols at the data points.


clear all
x=1:10;
y1 = rand(1,10);
y2 = rand(1,10)*10;
y3 = rand(1,10);
y4 = rand(1,10)*10;
plotyy(x,y1,x,y2);
hold on
plotyy(x,y3,x,y4);
[ax,h1,h2]=plotyy(x,y3,x,y4);
set(h1,"linestyle","none","marker","o");
set(h2,"linestyle","none","marker",">");

Doug

reply via email to

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