Store the matrix portion inside the variable and reuse it

I wrote a graphical application that, after performing some analyzes on a large data set, offers the possibility of several options for constructing data (via a pop-up menu).

So, now each plot is calculated "on the fly" when selected in a pop-up menu. This is inefficient and time consuming, so I would like to calculate all these graphs only once, and then save them somehow in variables and be able to assign each of them to the gui axis descriptor.

Basically, I want to have a graph like h = plot ([1 2 3]) stored in a variable (without visualization), and be able to visualize it on demand later. I tried to assign an axis descriptor to a graph descriptor, for example.

h=plot([1 2 3]);
handles.plottingscreen_axe=h; 

... but he does not see anything. To simplify this problem, I tried using test data on the terminal to simply assign one curly descriptor to another in order to somehow reset the visualization to another figure, but nothing works, for example.

h=plot([1 2 3]);
f=figure;
f=h;

... but I cannot imagine graph h to illustrate f.

Obviously, I have no experience with graphic pens, so I think this is something simple for someone who is. I could not find any documentation related to it, everyone suggests just making a function that replaces everything, but this is exactly what I'm trying to avoid.

Any help is appreciated, and I apologize if my question is about something too basic.

+5
3
figure;
ah = axes;
hold(ah,'on');  
%Axes must have hold on or lh(1) will become invalid after lh(2) is created
lh(1) = plot(ah,[1 2 3],[1 2 3],'r','visible','off');
lh(2) = plot(ah,[1 2 3],[3 2 1],'b','visible','off');

1 ()

set(lh(1),'visible','on');set(lh(2),'visible','off')

2 ()

set(lh(1),'visible','off');set(lh(2),'visible','on')

- / . . , , .

+4

, , saveas, .

:

>> plot(1:4,5:8)
>> saveas(gcf,'test.fig')
>> close all
>> open('test.fig')
+1

, .

, 'Visible' 'true' 'false'

+1

All Articles