Semilogy Subplot Multiple figures not working

11 visualizzazioni (ultimi 30 giorni)
Pat
Pat il 27 Mar 2015
Commentato: dpb il 27 Mar 2015
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 Commento
dpb
dpb il 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

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Downloads in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by