Plotting in GUI of Matlab
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Until now i had only 1 axes in my GUI to I used to just plot directly using plot command. Plus i need to plot these in a loop.
for i = 1:length(sig)
plot(sig(i).time,sig(i).signal,sig(i).time,updated(i).filter,sig(i).time)
hold on
end
Now i have 2 axes in my GUI, how i make a certain plot appear in 1 plot and another in my 2nd plot
0 comentarios
Respuestas (1)
Bjorn Gustavsson
el 24 de Ag. de 2016
Keep the handles to the axes you create:
axs(1) = subplot(1,2,1);
axs(2) = subplot(1,2,2);
Then make the axes you want to plot on the current axes before plotting:
for i1 = 1:17,
g = randn(1);
if g > 0
axes(axs(2))
plot(randn(1,23),'linewidth',2,'color',rand(1,3))
hold on
else
axes(axs(1))
plot(randn(1,23),'linewidth',1,'color',rand(1,3))
hold on
end
end
HTH
0 comentarios
Ver también
Categorías
Más información sobre Graphics Objects en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!