How to plot a large data set with markers to differentiate two overlapping lines?

10 ビュー (過去 30 日間)
KaMATLAB
KaMATLAB 2021 年 1 月 10 日
編集済み: KaMATLAB 2021 年 1 月 11 日
Hi, Please I have large data sets to plot. The data sets is more than 100, 000 data points. I need to use markers or means of differentiating the lines when printed in balck and white. Reviewers of my work suggetsed that i should use marker. Each time i use marker I get a clumsy and messy plots as shwon below. Now I used colors to diffrentaite the two plots but printing in black and white does not reveal the distintion of the two plots. I have read what @image analyst explained in this https://www.mathworks.com/matlabcentral/answers/57241-plot-large-dataset-with-sample-points#answer_69235 but it is not working for me. I need to be able to differentiate the two plots. The code of my plot is below. The plots are also shown below.
How do i modify the code to get two distinct plots in balck and white?
the first plot is when i used marker. Please note that only one plot dominate due to large data points with marker.
the second plot is when i didnt use any marker but color distintion. However, it dissappears after printing in balck and white.
plot(t,n_d,'r-')
% plot(t,R_react)
% plot(t,T_l)
% plot(t,T_react)
hold on
plot(t,n_r, 'bo')
legend('Desired power','Actual power')
ylabel('Reactor core relative power')
% ylabel('Reactivity due to control rod during load droping')
% ylabel('Exit temperature of coolant during load dropping')
% ylabel('Total reacticity during load dropping')
% plot(t,U)
% ylabel('Control gain')
xlabel('Time (s)')
hold off
norm(Ustc);

採用された回答

Alan Stevens
Alan Stevens 2021 年 1 月 10 日
How about plotting every n points. For example
plot(t(1:1000:end),n_d(1:1000:end),'o')
hold on
plot(t(500:1000:end),n_r(500:1000:end),'s')

その他の回答 (1 件)

KaMATLAB
KaMATLAB 2021 年 1 月 10 日
編集済み: KaMATLAB 2021 年 1 月 10 日
Thank you very much for the adjustment and the insight. However, I want the plots to be distinct and the markers to be disticnt as well. They are crowded together. I tried to adjust the interval so that i can have the markers for the different plots at different intervals.
I got the plot below after the adjustment based on your opinion. It seems clumsy and crowded together.
Thank you
Moreover, I want the Linestyle of the two plots to be obvious and the colors to be more distinct. Thank you
  2 件のコメント
Alan Stevens
Alan Stevens 2021 年 1 月 11 日
編集済み: Alan Stevens 2021 年 1 月 11 日
Make the spacing larger! i.e. change the interval to 1500 or 2000, or whatever gives a clearer result.
KaMATLAB
KaMATLAB 2021 年 1 月 11 日
編集済み: KaMATLAB 2021 年 1 月 11 日
Thank you very much. I have been able to combine your thoughts and MarkerIndices command. They are both giving desired results.

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

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by