How do I optimize graph size?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I optimize the black graph? I cannot display the red and blue graph because of the scale of the black graph. Is there any ways to shrink the only black graph and so that I can display three graph together properly. I need to use the maxium value of the black graph.
please, help me to make the proper graph.
Thank you.
1 commentaire
Sam Chak
le 20 Nov 2023
Hi @Byungho
Tfuel obviously has a larger amplitude compared to Twater and Tclad. Do you want to normalize them and plot all normalized sine waves on the same graph?
Also, what exactly do you mean by "I need to use the maximum value of the black graph"?
Réponse acceptée
VBBV
le 20 Nov 2023
May be the change in coefficient for cosine function plotted in black color as shown below
z = -72:0.2:72;
hold on
Tb = 543.41+41.9*(1+sin(pi*z/144));
plot(z,Tb,'r','linewidth',2)
Tb = 543.41+41.9*(1+sin(pi*z/144))+48.86*(cos(pi*z/144));
plot(z,Tb,'b','linewidth',2)
Tb = 543.41+41.9*(1+sin(pi*z/144))+33.72*(cos(pi*z/144)); % may be this change
plot(z,Tb,'k','linewidth',2); grid; legend('Twater','Tclad','Tfuel','location','best')
2 commentaires
VBBV
le 20 Nov 2023
if you want all the plots to compare together, an alternate way is to use subplot
z = -72:0.2:72;
subplot(211)
Tb = 543.41+41.9*(1+sin(pi*z/144));
plot(z,Tb,'r','linewidth',2); grid;
Tb = 543.41+41.9*(1+sin(pi*z/144))+48.86*(cos(pi*z/144));
hold on
plot(z,Tb,'b','linewidth',2)
Tb = 543.41+41.9*(1+sin(pi*z/144))+3372*(cos(pi*z/144)); % may be this change
legend('Twater','Tclad','location','best')
subplot(212)
plot(z,Tb,'k','linewidth',2); grid; legend('Tfuel','location','best')
Plus de réponses (1)
Mathieu NOE
le 20 Nov 2023
hello
first idea would be to use a Y log scale so it would reduce the black curve peak and you would see better the blue and red curves
z = -72:0.2:72;
Tb = 543.41+41.9*(1+sin(pi*z/144));
Tc = 543.41+41.9*(1+sin(pi*z/144))+48.86*(cos(pi*z/144));
Tm = 543.41+41.9*(1+sin(pi*z/144))+3372*(cos(pi*z/144));
plot(z,Tb,'r',z,Tc,'b',z,Tm,'k','linewidth',2);
semilogy(z,Tb,'r',z,Tc,'b',z,Tm,'k','linewidth',2);
legend('Twater','Tclad','Tfuel','location','best')
otherwise you can try also to break the y axis in two separate parts :
0 commentaires
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots 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!