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 Bwhich 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 EMEAOffice: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 (0)2920 520178awe...@hidglobal.com <mailto:awe...@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@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
decay_rate_gui.sce
Description: application/scilab-sce
_______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users