From: Mounir on
Hello everybody,

Does anyone know :

1/ how to change colors of both curves in a plotyy ?

The defaults colors are green and blue but i wanna customise it.

2/ In the GUI, how to hide a plot within axes using a chekbox

Thanks for help.
From: Wayne King on
"Mounir " <mounir.berhmani(a)lyonnaise-des-eaux.fr> wrote in message <i09rft$mfo$1(a)fred.mathworks.com>...
> Hello everybody,
>
> Does anyone know :
>
> 1/ how to change colors of both curves in a plotyy ?
>
> The defaults colors are green and blue but i wanna customise it.
>
> 2/ In the GUI, how to hide a plot within axes using a chekbox
>
> Thanks for help.

Hi did you read the help for plotyy?
>>doc plotyy

You can use the handles to change the colors and other properties

x = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);
[AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
set(H1,'color',[0 0 0]);
set(H2,'color',[0 1 0],'linewidth',2);

Wayne
From: us on
"Mounir " <mounir.berhmani(a)lyonnaise-des-eaux.fr> wrote in message <i09rft$mfo$1(a)fred.mathworks.com>...
> Hello everybody,
>
> Does anyone know :
>
> 1/ how to change colors of both curves in a plotyy ?
>
> The defaults colors are green and blue but i wanna customise it.

a hint:

doc plotyy;
% in particular
%{
....
[AX,H1,H2] = plotyy(x,y1,x,y2,'plot');
You can use the handles returned by plotyy to label the axes and set the line styles used for plotting.
....
%}

us
From: Steven Lord on

"Mounir " <mounir.berhmani(a)lyonnaise-des-eaux.fr> wrote in message
news:i09rft$mfo$1(a)fred.mathworks.com...
> Hello everybody,
>
> Does anyone know :
>
> 1/ how to change colors of both curves in a plotyy ?
>
> The defaults colors are green and blue but i wanna customise it.

Wayne and us answered this question.

> 2/ In the GUI, how to hide a plot within axes using a chekbox

Have the checkbox's Callback function use SET to change the Visible property
of the plot.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/line_props.html#Visible

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


 | 
Pages: 1
Prev: Help in matlab
Next: error message using SNCTOOLS