[scilab-Users] Re: legend for surf (3D)

Mathieu Dubois mathieu.dubois at limsi.fr
Wed Nov 24 11:44:31 CET 2010


Hello,

On 11/24/2010 10:20 AM, Ginters Bušs wrote:
> I get it for 2D plots, but for a 3D plot children is empty.
>
> On Wed, Nov 24, 2010 at 10:11 AM, Ginters Bušs <ginters.buss at gmail.com 
> <mailto:ginters.buss at gmail.com>> wrote:
>
>     Dear all,
>
>     I see legend issue comes up from time to time in this list.
>     However, I still can not make my legend work.
>
>     Here is my simple graph. I'm drawing 4 surfaces in one graph window:
>
>     surf(sigmavector,phivector,fsbkcor,'facecol','red')
>     surf(sigmavector,phivector,abkcor,'facecol','green')
>     surf(sigmavector,phivector,acfcor,'facecol','yellow')
>     surf(sigmavector,phivector,fscfcor,'facecol','black')
>
>     What is the way to add a legend to this graph? All the time I try
>     to call the legend function, there is an
>
>     !--error 10000
>     legend: No 'Polyline' handle found.
>
>
>     I understand I have to deal with some 'children', and I will
>     appreciate an advice here.
>
By default legend tries to find polyline(s) i.e. a scatter X-Y line 
specified by coordinates of points (probably the most common plot) in 
the current figure. This is because legend is made for graph where there 
are several of those lines.
surf creates Fac3D objects which specify how to draw a surface. Your 
graph is very special and it's a bit hard to figure out of you would 
like to use legend. Could you send a complete toy example (e.g. a small 
dataset to plot)?

You can try to use the legends function (note the 's'): it works on 
plots created by surf but I'm not sure this is what you want.
>
>     To developers: help on 'legend' might be a little bit more
>     elaborated/explained.
>

HTH,
Mathieu
>
>     Sincerely,
>     Ginters
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20101124/e1745fe7/attachment.htm>


More information about the users mailing list