Discussion:
change color line in plotyy
shivax
2018-10-13 12:32:10 UTC
Permalink
hi,

i try to change color line but is not correct

j=plotyy (x,EquityU,x,EquityF);
set(j(1),"color",'red');

it change background..but i want to change line color



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
Penfold
2018-10-13 14:26:21 UTC
Permalink
clf;
t = (0:0.1:9);
x = sin (t);
y = 5 * cos (t);
[hax, h1, h2] = plotyy (t, x, t, y);

set(hax,{'ycolor'},{'blue';'red'})
set(h1, "linestyle", ":");
set(h2, "linestyle", "-");
set(h1,'LineWidth',2);
set(h1,'Color','blue');
set(h2,'LineWidth',2);
set(h2,'Color','red');

xlabel (hax(1), "xlabel");
title (hax(2), 'plotyy demo');
ylabel (hax(1), "Left axis is Blue");
ylabel (hax(2), "Right axis is Red");



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
Andreas Weber
2018-10-13 14:37:39 UTC
Permalink
Post by shivax
set(j(1),"color",'red');
it change background..but i want to change line color
Have you tried "linecolor" if you want to change the line color?
shivax
2018-10-13 15:56:50 UTC
Permalink
hi

Andreas Weber-6 : i try it but don't run


Penfold : thank....your solution is ok



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
Loading...