Live plots with text boxes
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to plot two waveforms to appear like realtime plots. I also need to have two text boxes in the same figure with static content.

I am trying to achieve it with the following approach. Only one waveform and one textbox are being displayed. However, when i comment out the textboxes i do get two live plots. What am i doing wrong?
for n = somevalue
subplot(2,2,1)
ax1pos_adj = [ 0.0500 0.8000 0.7500 0.1612];
set(gca,'position',ax1pos_adj)
plot (t,ei);
axis([t(n),t(n+Dx),yaxis1,yaxis2]);
grid
subplot(2,2,2)
ax2pos_adj = [ 0.8500 0.8000 0.1400 0.1612];
set(gca,'position',ax2pos_adj)
xpos = 0.1; ypos = 0.5;
text(xpos, ypos, '90', 'FontSize', 70, 'Color', 'y')
set(gca,'XColor', 'none','YColor','none')
subplot(2,2,3)
ax3pos_adj = [ 0.0500 0.5800 0.7500 0.1612];
set(gca,'position',ax3pos_adj)
plot (t,ecgii);
axis([t(n),t(n+Dx),yaxis3,yaxis4]);
grid
subplot(2,2,4)
ax2pos_adj = [ 0.8500 0.5800 0.1400 0.1612];
set(gca,'position',ax2pos_adj)
xpos = 0.1; ypos = 0.5;
text(xpos, ypos, '130', 'FontSize', 40, 'Color', 'g')
set(gca,'XColor', 'none','YColor','none')
drawnow
end
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!