[Scilab-users] [EXT] Re: Request for suggestions with plotting.

Adrian Weeks aweeks at hidglobal.com
Mon Jul 27 15:02:33 CEST 2020


Hello Antoine,

Thank you very much for your reply, it certainly did help.
I was trying to delete then re-plot the curves - it hadn't occurred to me to just change the data - as ever, the solution is easy once you've seen it.
I notice you're re-scaling the plots by manually changing the data bounds - I will need to do this - I haven't come across a 're-scale' function.

Very many thanks again.

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>


From: users <users-bounces at lists.scilab.org> On Behalf Of Antoine Monmayrant
Sent: 25 July 2020 07:04
To: users at lists.scilab.org
Subject: [EXT] Re: [Scilab-users] Request for suggestions with plotting.

*** Please use caution this is an externally originating email. ***

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]<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hidglobal.com%2F&data=02%7C01%7Caweeks%40hidglobal.com%7Cdbf5f9e71296412176f508d830609a27%7Cf0bdc1c951484f86ac40edd976e1814c%7C0%7C0%7C637312538764470572&sdata=%2Ffv2bmlFbeKgslJSt9UY%2Fi47f%2BKKRn0JpwUxinD4BAw%3D&reserved=0>
Unit 3, Cae Gwyrdd,
Green meadow Springs,
Cardiff, UK,
CF15 7AB.
www.hidglobal.com<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.hidglobal.com%2F&data=02%7C01%7Caweeks%40hidglobal.com%7Cdbf5f9e71296412176f508d830609a27%7Cf0bdc1c951484f86ac40edd976e1814c%7C0%7C0%7C637312538764470572&sdata=%2Ffv2bmlFbeKgslJSt9UY%2Fi47f%2BKKRn0JpwUxinD4BAw%3D&reserved=0>





_______________________________________________

users mailing list

users at lists.scilab.org<mailto:users at lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.scilab.org%2Fmailman%2Flistinfo%2Fusers&data=02%7C01%7Caweeks%40hidglobal.com%7Cdbf5f9e71296412176f508d830609a27%7Cf0bdc1c951484f86ac40edd976e1814c%7C0%7C0%7C637312538764480567&sdata=reUILBvIzp3e0N0%2B4H5SNnwPBXMqksCjUDmBC6zsob8%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200727/56b86c36/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 1751 bytes
Desc: image001.gif
URL: <https://lists.scilab.org/pipermail/users/attachments/20200727/56b86c36/attachment.gif>


More information about the users mailing list