In MATLAB Plots, how can I add Circles, Crosses, Diamonds symbols to long data curves?
7 ビュー (過去 30 日間)
古いコメントを表示
Hello folks,
I have a very huge y data that I want to plot, the problem I am facing is how to to add symbols to the some data of the curves because I want to avoid using colors and I want them to be clear for the reader? As you know if I use the simple method I'm using here these symbols will disappear due to the huge number of samples. Any help on this ?
here is the code I use:
load test.txt
x = test(:,1); x=x';
y1 = test(:,2); y1 = y1';
y2 = test(:,3); y2 = y2';
y3 = test(:,4); y3 = y3';
plot(x,y1,'--',x,y2,'-d',x,y3,'-o'); legend('V_x', 'V_1','V_2');
xlabel('Time (s)');ylabel('Voltage (v)');grid on;
0 件のコメント
回答 (2 件)
KSSV
2016 年 12 月 6 日
編集済み: KSSV
2016 年 12 月 6 日
You can follow some thing like this:
x = test(:,1); x=x';
y1 = test(:,2); y1 = y1';
y2 = test(:,3); y2 = y2';
y3 = test(:,4); y3 = y3';
quit = 5000 ;
plot(x(1:quit:end),y1(1:quit:end),'*r',x(1:quit:end),y2(1:quit:end),'bd',.......
x(1:quit:end),y3(1:quit:end),'go');
legend('V_x', 'V_1','V_2');
xlabel('Time (s)');ylabel('Voltage (v)');grid on;
hold on
plot(x,y1,'r',x,y2,'b',x,y3,'g');
参考
カテゴリ
Help Center および File Exchange で Results, Reporting, and Test File Management についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!