How do I optimize graph size?

4 ビュー (過去 30 日間)
Byungho
Byungho 2023 年 11 月 20 日
コメント済み: Byungho 2023 年 11 月 20 日
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 件のコメント
Sam Chak
Sam Chak 2023 年 11 月 20 日
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"?

サインインしてコメントする。

採用された回答

VBBV
VBBV 2023 年 11 月 20 日
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 件のコメント
VBBV
VBBV 2023 年 11 月 20 日
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')
Byungho
Byungho 2023 年 11 月 20 日
Thanks, It works great.

サインインしてコメントする。

その他の回答 (1 件)

Mathieu NOE
Mathieu NOE 2023 年 11 月 20 日
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 :

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by