Semilogy Subplot Multiple figures not working
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm having trouble plotting multiple figures using subplot and semilogy. Only the last figure appears in semilogy
h = figure(2);
for k = 1:length(T0)
subplot(2,2,k);
semilogy(P0,squeeze(ploss(k,1,:)),'b');
str1 = strcat('\leftarrow', sprintf('max = %4.2f',max(massflow(k,1,:))));
text(max(P0),max(squeeze(massflow(k,1,:))),str1);
hold on;
semilogy(P0,squeeze(ploss(k,2,:)),'r');
hold off;
str1 = strcat('\leftarrow', sprintf('max = %4.2f',max(massflow(k,2,:))));
text(max(P0),max(squeeze(massflow(k,2,:))),str1);
xlabel('Upstream Pressure Pa');
ylabel('Pressure Loss %');
title(sprintf('Valve Diameters and Pressure Loss, T0 = %d K',T0(k)));
legend('8 in','10 in');
end

1 commentaire
dpb
le 27 Mar 2015
Must have something to do with either version or the use of hold The following shows both log y-axes here w/ R2012b
>> for i=1:2,subplot(2,1,i),semilogy(1:10,exp(rand(1,10))),end
Réponses (0)
Voir également
Catégories
En savoir plus sur Downloads dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!