[Scilab-users] Changing polyline properties in param3d1

Samuel Gougeon sgougeon at free.fr
Thu Jul 19 23:57:00 CEST 2018


Le 19/07/2018 à 21:30, Samuel Gougeon a écrit :
> Le 18/07/2018 à 15:19, Izabela Wójcik-Grząba a écrit :
>> Hello,
>>
>> I am looking for an elegant and simple way to manage with changing 
>> properties of polylines in a param3d1 plot. The problem is that 
>> sometimes (in case of specific data) there is only one polyline to 
>> draw but in most cases there are many polylines. By now I solved this 
>> problem by using "if" statement like below:
>>
>> param3d1(X,Y,Z);
>>
>> if size(X,'c')==1 then
>>     gce().polyline_style=4;
>>     gce().thickness=2;
>>     gce().foreground=32;
>> else
>>     gce().children.polyline_style=4;
>>     gce().children.thickness=2;
>>     gce().children.foreground=32;
>> end
>
> You are right: it would be preferable to get always the same graphical 
> structure, whatever is the number of plotted curves, as it is the case 
> with plot2d():
>
> --> plot2d(1:10)
> --> gce()
>  ans  =
>
> Handle of type "Compound" with properties:
> ==========================================
> parent: Axes
> children: "Polyline"
> visible = "on"
> user_data = []
> tag = ""
>
> --> clf, plot2d([1:10 ; 1:10]')
> --> gce()
>  ans  =
> Handle of type "Compound" with properties:
> ==========================================
> parent: Axes
> children: ["Polyline";"Polyline"]
> visible = "on"
> user_data = []
> tag = ""
>
> So, the same stable architecture shall be reached for param3d1().
> Such a change won't be back-compatible, but searching for "param3d1" 
> in all existing programs and updating them will be easy.
> This change can be proposed for Scilab 6.1.

This bug about param3d1() unstable hierarchy is now reported there 
<http://bugzilla.scilab.org/show_bug.cgi?id=15671>.

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


More information about the users mailing list