But still I've a question (sry): What do you mean by " Also please don't use html on the mail list." ?
Von: Ben Abbott <address@hidden>
An: Sina Calmote <address@hidden>
CC: "address@hidden list" <address@hidden>
Gesendet: Dienstag, den
1. Februar 2011, 14:38:51 Uhr
Betreff: Re: AW: AW: How work the plot properties if errorbar is used?
On Feb 1, 2011, at 8:31 AM, Sina Calmote wrote:
> Von: Ben Abbott <
address@hidden>
> An: Sina Calmote <
address@hidden>
> CC: "
address@hidden mailing list" <
address@hidden>
> Gesendet: Dienstag, den 1. Februar 2011, 14:18:07 Uhr
> Betreff: Re: AW: How work the plot properties if errorbar is used?
>
>> On Feb 1, 2011, at 7:57 AM, Sina Calmote wrote:
>>
>> > Von:
Ben Abbott <
address@hidden>
>> > An: Sina Calmote <
address@hidden>
>> > CC: "
address@hidden" <
address@hidden>
>> > Gesendet: Dienstag, den 1. Februar 2011, 12:56:49 Uhr
>> > Betreff: Re: How work the plot properties if errorbar is used?
>> >
>> >> On Jan 31, 2011, at 4:43 PM, Sina Calmote <
address@hidden> wrote:
>> >>
>> >>> Dear all
>> >>>
>> >>> I try to
plot data with errorbars like I did in the following example for the normal plot (but without the bars):
>> >>> plot(x,y,'-*r','markersize',1.2)
>> >>> but if I write:
>> >>> errorbar(x,y,ly,uy,"~","-*r",'markersize',1.2)
>> >>> I get an error message:
>> >>> error: Invalid call to __errplot__. Correct usage is:
>> >>> -- Function File: H = __errplot__ (FSTR,P, ...)
>> >>>
>> >>> but I don't understand this message and I hope someone will help me
>> >>> THANKS ;)
>> >>>
>> >>> Ursina
>> >>
>> >> There should be *one* format spec per plot. Unfortunately, there is a bug in that prevents the format for both the line and error bars from being specified. This
has been fixed in the developers sources.
>> >>
>> >> The suggestion Andy gave should do what you want.
>> >>
>> >> Ben
>> > Thanks
>> > but I can't set any propertie as color or marker
>> > I tried: errorbar(x,y,dy,'r') in order to set the color as red... but then I get just an error message:
>> >
>> > > WinkelFitCos
>> > error: `n' undefined near line 59 column 33
>> > error: invalid limit value in colon _expression_
>> > error: evaluating argument list element number 1
>> > error: called from:
>> > error: C:\Program Files\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\__pltopt1__.m at line 59, column 25
>> > error: C:\Program Files\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\__pltopt__.m at line 113, column 28
>> >
error: C:\Program Files\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\__errplot__.m at line 35, column 15
>> > error: C:\Program Files\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\__errcomm__.m at line 54, column 16
>> > error: C:\Program Files\Octave\3.2.3_gcc-4.4.0\share\octave\3.2.3\m\plot\errorbar.m at line 131, column 5
>> > error: C:\Users\Sina\Desktop\Winkel\WinkelFitCos.m at line 68, column 1
>> >
>> > and if I plot like the following:
>> >
>> > hold on
>> > errorbar(x,y1,dy1,'r')
>> > errorbar(x,y2,dy2,'r')
>> > hold off
>> >
>> > I get two blue curves with bars but different markers (picture attached...)
>> >
>> > and if I plot like:
>> > hold on
>> > errorbar(x,y1,dy1)
>> > plot(x,y1,'-r')
>>
> plot(x,Fit,'r')
>> > errorbar(x,y2,dy2)
>> > plo(x,y2,'-b')
>> > plot(x,Fit2,'b')
>> > hold off
>> >
>> > then I still have errorbars in the wrong color....
>> >
>> > Maybe I don't really understand the hint of Andy, because I can't set any propertie in errorbar(...)
>> >
>> > Ursina
>>
>> I don't have Octave 3.2.3 available to run, but you try ...
>>
>> h = errorbar (x, y1, dy1, x, y2, dy2);
>> set (h(1), "color", [0 0 1])
>> set (h(2), "color", [1 0 0])
>>
>> ... to change the color to blue for y1 and red for y2.
>>
>> Does that work for you?
>>
>> If not, what does the follow give you?
>>
>> get (h, "type")
>>
>> Ben
>>
>> p.s. please reply-all
and respond below. That way others who arrive late can read along.
>
> It worked! :) Thank you very much
> But I had to change
> h = errorbar (x, y1, dy1, x, y2, dy2);
> into:
> h(1) = errorbar(x, y1, dy1)
> h(2) = errorbar(x, y2, dy2)
>
> Would you explain me the meaning of set (h(1), "color", [0 0 1]) and how can I "produce" other colors?
> Is there something similar for the point style?
See "help plot" for information on available colors and maker styles.
The command ...
set (h, "color", [R, G, B])
... sets the color of the line object (with handle h) to the RGB color specified. For the markers, the syntax is ...
set (h, "marker", "s")
Ben
p.s. please reply-all and respond below. That way others who arrive late can read along. Also please don't use html on the mail list.