[Scilab-users] Lengend for 3d-plot and an horizontal plane at z=0

Samuel Gougeon sgougeon at free.fr
Sun Mar 26 15:20:38 CEST 2017


Hello,

Le 25/03/2017 à 09:14, fujimoto2005 a écrit :
> I have 3d-plot with 2 surfaces as an attached file.
> I want to improve its appearance.
>
> 1, Can I add the legend for each surface as 2d-plot?
> Help file tells me 'Legend' is only for 2d-plot and I can't find the same
> functionality for 3d-plot.
I do not see the file attached to your message. It is strange. It is 
only visible in the web archive..

legends are presently possible as well in 3D axes, but anyway only for 
polyline objects,
not for Fac3D surfaces.
Datatips are nor supported on surfaces.
The only possible trick that i could see is to define a polygon filled 
with the color of the surface,
made invisible, from which a legend() is built:

clf
surf()
e = gce();
e.color_flag = 0;
cyan = color("cyan");
e.color_mode = cyan;
xpoly(5,5,"marks")
p = gce();
p.fill_mode = "on";
p.background = e.color_mode;
p.visible = "off";
legend(p, "Surface 1")

// If the surface has some marks on its nodes, and we want them in the 
legend style:
p.mark_mode = "on";
p.mark_style = e.mark_style;
p.mark_foreground = e.mark_foreground;
p.mark_background = e.mark_background;


For several surfaces, just generate one invisible polygon matching their 
styles per surface, and provide to legend() a vector of their handles.

HTH
Samuel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170326/accec9f9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dfbanhicdodmgdfd.png
Type: image/png
Size: 15121 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20170326/accec9f9/attachment.png>


More information about the users mailing list