フィルターのクリア

How to plot 6 similar lines to see more obviously?

3 ビュー (過去 30 日間)
Phung Minh
Phung Minh 2019 年 10 月 15 日
コメント済み: Walter Roberson 2019 年 10 月 17 日
Hi everyone,
I have a trouble with plotting 6 similar lines in one figure. But the data are so close to one another? How to solve this?
untitled.jpg
Many thanks!

採用された回答

Walter Roberson
Walter Roberson 2019 年 10 月 15 日
Use multiple subplots. Or plot the difference between the lines. Or zoom in, a lot.
  3 件のコメント
Walter Roberson
Walter Roberson 2019 年 10 月 17 日
figure
base = B(:,1);
plot(A,B(:,2)-base,'-b','LineWidth',1.5)
hold on
plot(A,B(:,3)-base,'-k','LineWidth',1.5)
plot(A,B(:,4)-base,'--r','LineWidth',1.5)
plot(A,B(:,5)-base,'--b','LineWidth',1.5)
plot(A,B(:,6)-base,'--k','LineWidth',1.5)
hold off
set(gca,...
'Units','normalized',...
'FontUnits','points',...
'FontWeight','bold',...
'FontSize',14, ...
'FontName','Times')
% ylabel('Thickness(m)','Fontsize',14, 'FontName','times')
% xlabel('Stress distribution (N/m^2)','Fontsize',14, 'FontName','times')
legend('SS1.2-SS1.1','SS1.3-SS1.1','SS1.4-SS1.1','SS1.5-SS1.1','SS1.6-SS1.1')
xlabel('Time (s)')
ylabel('Pressure (bar)')
% set(gca,'yscale','log')
% xlim([100 500]);
grid on
Walter Roberson
Walter Roberson 2019 年 10 月 17 日
Or you might prefer
figure
base = mean(B,2);
plot(A,B(:,1)-base,'-r','LineWidth',1.5)
hold on
plot(A,B(:,2)-base,'-b','LineWidth',1.5)
plot(A,B(:,3)-base,'-k','LineWidth',1.5)
plot(A,B(:,4)-base,'--r','LineWidth',1.5)
plot(A,B(:,5)-base,'--b','LineWidth',1.5)
plot(A,B(:,6)-base,'--k','LineWidth',1.5)
hold off
set(gca,...
'Units','normalized',...
'FontUnits','points',...
'FontWeight','bold',...
'FontSize',14, ...
'FontName','Times')
% ylabel('Thickness(m)','Fontsize',14, 'FontName','times')
% xlabel('Stress distribution (N/m^2)','Fontsize',14, 'FontName','times')
legend('SS1.1-mean','SS1.2-mean','SS1.3-mean','SS1.4-mean','SS1.5-mean','SS1.6-mean')
xlabel('Time (s)')
ylabel('Pressure (bar)')
% set(

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGaussian Process Regression についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by