Semilogy Subplot Multiple figures not working

21 Ansichten (letzte 30 Tage)
Pat
Pat am 27 Mär. 2015
Kommentiert: dpb am 27 Mär. 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 Kommentar
dpb
dpb am 27 Mär. 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by