How to view dashed line with multiple data?

I am plot two set of data and I wanted to plot one set as dashed line but due to very high data points the dashed line is difficult to differentiate (see attached figure). Can you please suggest me how to visualise the dashed line better ?

 採用された回答

KSSV
KSSV 2022 年 3 月 21 日

1 投票

You can plot them with different colors or with different markers. This would be better.
Other option is, you can skip some data points and then plot by dots.
skip = 2 ;
idx = 1:skip:length(x) ;
plot(x(idx),'.')

3 件のコメント

sanjay Krishnamurthy
sanjay Krishnamurthy 2022 年 3 月 21 日
Thank you for your answer, changing colour and legend type will not help since I have too many data points. But your second suggestion is feasible in my case. But I did try but not able to skip the data. Could you suggest with my code please, Thank you
%plot of variables with data
plot(Ref_T,0.997*Ref_mwmg,'--')
hold on
plot(AR_T,AR_mwmg)
hold on
%plotx-y axis limit
xlim([50 580])
ylim([0.16 0.23])
%text
h=text(80,0.218,'Exo→')
set(h,'Rotation',90) %text rotation
%labeling the axis
legend('Base line','AR 5028')
xlabel("Temperature in C")
ylabel('Heat Flow in mW/mg (Exothermic→)')
I
KSSV
KSSV 2022 年 3 月 21 日
skip = 5 ;
idx = 1:skip:length(REf_T) ;
%plot of variables with data
plot(Ref_T(idx),0.997*Ref_mwmg(idx),'--')
hold on
plot(AR_T,AR_mwmg)
hold on
%plotx-y axis limit
xlim([50 580])
ylim([0.16 0.23])
%text
h=text(80,0.218,'Exo→')
set(h,'Rotation',90) %text rotation
%labeling the axis
legend('Base line','AR 5028')
xlabel("Temperature in C")
ylabel('Heat Flow in mW/mg (Exothermic→)')
sanjay Krishnamurthy
sanjay Krishnamurthy 2022 年 3 月 21 日
Thank you so much.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeVector Fields についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by