Info

This question is closed. Reopen it to edit or answer.

superimpose two or more plots

1 view (last 30 days)
Vincent I
Vincent I on 13 Jul 2012
Hi, i am able to impose two plots at the moment using the code bellow however when I remove the axis for the second plot the second plot line matches the axes of the first plot. Is there a way to keep the second h=plot(hover,x,y) the way it is onto the first plot after removing the axes?
i've tried hold on, axis([Pmin Pmax -inf inf]) but nothing worked. any ideas? thank you
plot(handles.Axes1,SomeX,SomeY)
h_ax(1) = axes('parent',hObject,...
'position',[xpos+.009, cpos(2), cpos(3) *.00066, cpos(4)],...
'Tag','Top', 'NextPlot', 'add');
hplt = plot(h_ax,x,y);
hover = axes('parent',hObject,...
'position',[cpos(1), cpos(2) cpos(3) cpos(4)],'Layer','top',...
'box','off','selected','off','visible','off','Xgrid','off',...
'Ygrid','off');
h=plot(hover,x,y);
set(h,'Color',ycolor);
axis(hover,'off','tight')

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!