[Scilab-users] Pushbutton exporting the plot to graphic file

classic Classic list List threaded Threaded
1 message Options
Iza Iza
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Pushbutton exporting the plot to graphic file

Hello,

I am still fighting with my figure with plot inside about which I wrote
here:
http://mailinglists.scilab.org/Scilab-users-Export-plot-from-figure-with-uicontrols-td4039166.html

I deleted the frame in which there was a plot so now I can export it to
a graphic file. In the left frame with checkboxes I added a pushbutton.
I wanted to use it to export current view of the plot (as I can change
the visibility of its elements with the checkboxes). I added a callback
function for the pushbutton as below:

function [n_ex]=eksport(n_ex)
     n_ex=n_ex+1;
     xs2png(f2,'widok_'+string(n_ex));
endfunction

The plan was to add a number to a file name. The number would increase
with every export so I could produce different pictures from the plot. A
variable n_ex is initialized with zero outside the callback function.
Unfortunately something is wrong here because when I use the pushbutton
I get a prompt: "Undefined variable: n_ex".
The whole definition of the figure and plot is inside a function - maybe
it's also an important information.

Any idea would be appreciated.

Kind regards,
Iza
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users