Semilogy Subplot Multiple figures not working
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
dpb
el 27 de Mzo. de 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
Respuestas (0)
Ver también
Categorías
Más información sobre Downloads en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!