I call a function multiple times with a different integer argument, 'month'. I open up a new figure each time within the function - 'figure(month)'. However, the figures do not survive when the program ends. I have tried calling the function with a new figurehandle and opened the figure within the function with that figurehandle. But, the figure still does not survive. Even if I call the function once, the figure does not survive. How can I draw a figure within a function and have it available when the program ends>
In the calling program, I have "figureHandle=figure(month)". I pass the figureHandle as an argument to the function and within the function I initiate the figure by "figure(figureHandle)". What am I doing wrong?