[Scilab-users] Request for suggestions with plotting.

Antoine Monmayrant antoine.monmayrant at laas.fr
Sat Jul 25 08:04:07 CEST 2020


Hello Adrian,

Here is what I would do:

(1) use 'tag' property field of your curve together with findobj to get 
access to the plot to be updated, without passing the handle.
(2) instead of deleting the curve and recreating it, I would directly 
modify its content (data property) and then ask for a replot/rescale if 
needed.

You can have a look at the content of function 'replot()' for a typical 
example.
It get called when the user changes the top slider in the GUI or presses 
Re-run.
It is far from perfect, but it does something that might look like what 
you want.

Hope it helps,

Antoine

On 24/07/2020 19:11, Adrian Weeks wrote:
>
> Hi All,
>
> I wonder if anyone could suggest a solution to this problem?
>
> I want to:
>
>                 Create a figure. This remains fixed.          This I 
> can do.
>
>                 Create four axes within the 
> figure.                                            These remain 
> fixed.        This I can do.
>
>                 In each of the four axes plot two reference 
> curves.           These remain fixed.        This I can do.
>
>                 Repeatedly call a function A
>
> which calls an inner function B
>
> which plots a curve in each of the four axes having deleted the ones 
> it plotted on the previous call of A.                               
> This I can’t do.
>
> The idea is that the figure, axes and reference curves remain in place 
> while the temporary curves are repeatedly deleted and re-plotted to 
> allow an ‘animation’ showing the progression of the curves.
>
> I can’t see a way to pass and delete the handles to the polylines 
> produced by plot2d / gce.  I’ve tried passing as parameters, using 
> global variables, all to no avail.  The most common error is from 
> ‘delete’, complaining that “The handle is not valid”.
>
> Many thanks in anticipation.
>
> Adrian Weeks
> Development Engineer, Hardware Engineering EMEA
> Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 
> (0)2920 520178
> aweeks at hidglobal.com <mailto:aweeks at hidglobal.com>
>
> HID Global Logo <http://www.hidglobal.com/>
>
> Unit 3, Cae Gwyrdd,
> Green meadow Springs,
> Cardiff, UK,
> CF15 7AB.
> www.hidglobal.com <http://www.hidglobal.com>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200725/4e63a7d3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1751 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20200725/4e63a7d3/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decay_rate_gui.sce
Type: application/x-scilab-sce
Size: 12670 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20200725/4e63a7d3/attachment.bin>


More information about the users mailing list