In MATLAB Plots, how can I add Circles, Crosses, Diamonds symbols to long data curves?
7 views (last 30 days)
Show older comments
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 Comments
Answers (2)
KSSV
on 6 Dec 2016
Edited: KSSV
on 6 Dec 2016
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');
See Also
Categories
Find more on Results, Reporting, and Test File Management in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!