change color line in plotyy

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

change color line in plotyy

shivax
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


Reply | Threaded
Open this post in threaded view
|

Re: change color line in plotyy

Penfold
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


Reply | Threaded
Open this post in threaded view
|

Re: change color line in plotyy

Andreas Weber-6
In reply to this post by shivax
Am 13.10.18 um 14:32 schrieb 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?


Reply | Threaded
Open this post in threaded view
|

Re: change color line in plotyy

shivax
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