Plotting a line on same axes as pcolor in GUI

I'm trying to plot a line on top of my color plot in a GUI made in GUIDE. I would typically use the "hold on" command, but this doesn't work in GUI. Or I would plot(x,y1,x,y2) for two lines. Here's what I've got so far:
p = handles.pAxes;
h = pcolor(p,x,Vi,dos');
set(h,'edgecolor','none')
shading(p,'interp');
colormap(p,'cool');
plot(p,x,vpot);
xlabel(p,'x (A)');
ylabel(p,'E (eV');
Doing this the (x,vpot) plot simply replaces pcolor. Halp!

Categories

Asked:

on 29 Oct 2011

Answered:

on 28 Dec 2021

Community Treasure Hunt

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

Start Hunting!