From: Sabrina Speich on
Hi,

I would like to know if there is a solution to label the contour lines with names (hence text strings) I would like tu use instead of numbers.

Is there any solution for this ? I am not able to find it in the Matlab Manual or newsletters etc


Thank you for helping me with this.

Best regards,


Sabrina
From: Rich Ellis on
Try using the CLABEL function to get the text object handles and then set
the text object "String" property to the text you want. Something like this:

[C,h] = contour(peaks(20),3);
th = clabel(C,h);
set(findobj(th,'String','0.59778'),'String','Base Line')

where '0.59778' is the numeric label of the line whose label you want to
change and 'Base Line' is the label you want that line to use.


"Sabrina Speich" <speich(a)univ-brest.fr> wrote in message
news:hkrt7p$oi9$1(a)fred.mathworks.com...
> Hi,
>
> I would like to know if there is a solution to label the contour lines
> with names (hence text strings) I would like tu use instead of numbers.
>
> Is there any solution for this ? I am not able to find it in the Matlab
> Manual or newsletters etc
>
>
> Thank you for helping me with this.
>
> Best regards,
>
>
> Sabrina
>


From: Sabrina Speich on
Thank you Rich,

it works!


Sabrina

"Rich Ellis" <rich(a)mathworks.com> wrote in message <hksnc4$oe7$1(a)fred.mathworks.com>...
> Try using the CLABEL function to get the text object handles and then set
> the text object "String" property to the text you want. Something like this:
>
> [C,h] = contour(peaks(20),3);
> th = clabel(C,h);
> set(findobj(th,'String','0.59778'),'String','Base Line')
>
> where '0.59778' is the numeric label of the line whose label you want to
> change and 'Base Line' is the label you want that line to use.
>
>
> "Sabrina Speich" <speich(a)univ-brest.fr> wrote in message
> news:hkrt7p$oi9$1(a)fred.mathworks.com...
> > Hi,
> >
> > I would like to know if there is a solution to label the contour lines
> > with names (hence text strings) I would like tu use instead of numbers.
> >
> > Is there any solution for this ? I am not able to find it in the Matlab
> > Manual or newsletters etc
> >
> >
> > Thank you for helping me with this.
> >
> > Best regards,
> >
> >
> > Sabrina
> >
>
 | 
Pages: 1
Prev: sim() / set_param()
Next: Shaded band