I am currently working on a GUI. I would like to have one 'axes' on which I can display multiple plots depending on which the user selects. Currently I have 2 bar plots and 2 surfc plots. I am setting the plots using
set(p1, 'Parent', axes1)
However it looks like when I set a bar plot to an axes that had a surfc there is still a z axis, and the same problem exists the other way around but wuth the lack of a z axis. This sample scripts demonstrates.
figure(1);
a1 = axes();
p1 = bar(1:5);
figure(2);
a2 = axes();
x = [1 2];
z = zeros(2);
p2 = surfc(x, x, z);
set(p1, 'Parent', a2)
set(p2, 'Parent', a1)
What is the best way to go about this?