[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plot templates and options lists for set, plot etc.
From: |
Thorsten Meyer |
Subject: |
Re: plot templates and options lists for set, plot etc. |
Date: |
Sun, 05 Jul 2009 13:23:28 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.19 (X11/20090103) |
Hi,
>
> I'm running Matlab 2009a
>
> x = 0:0.01:5;
> h(1) = line (x, sin(x));
> h(2) = line (x, cos(x));
> s(1,1).Color = 'red';
> s(1,2).Color = 'green';
> set (h, s);
> color = get (h, 'color');
> color{:}
> ans =
> 0 1 0
> ans =
> 0 1 0
>
> I'd expected the lines to have different colors.
Could you also try
h(1) = line (x, sin(x));
h(2) = line (x, cos(x));
s(1,1).Color = 'red';
s(2,1).Color = 'green';
set (h, s);
color = get (h, 'color');
color{:}
?
>
> I also tried the following ...
>
> property_names = {'color', 'color'};
> property_values = {[1,0,0], [0,1,0]};
> set (h, property_names, property_values)
> color = get (h, 'color');
> color{:}
> ans =
> 0 1 0
> ans =
> 0 1 0
>
> It appears that the property names and values are each applied to all
> handles. The green sticks because it was set last.
Could you try again with
property_names = {'color'};
property_values = {[1,0,0]; [0,1,0]};
set (h, property_names, property_values)
color = get (h, 'color');
color{:}
?
Thanks
Thorsten
- Re: plot templates and options lists for set, plot etc.,
Thorsten Meyer <=