Filter löschen
Filter löschen

Plot markers with equal distance on a linear chart?

2 Ansichten (letzte 30 Tage)
Zeinab Ahmadi93
Zeinab Ahmadi93 am 5 Dez. 2017
Kommentiert: mounika am 5 Dez. 2017
Hello everbody :) Please help me draw the following picture(I should plot the circle and star markers exactly like the picture)
Below is my code but I can't plot my desired chart:
x=[5.98,8.06,10.71];
y=[0,1,0];
plot(x,y);
hold on;
x1=[5.98,8.11,11.01];
y1=[0,1,0];
plot(x1,y1,'b--o');
Thanks in advance:)
  1 Kommentar
mounika
mounika am 5 Dez. 2017
You need to have so many x values to have markers continuously. For example:
x = 0:pi/10:2*pi;
y1 = sin(x);
y2 = sin(x-0.25);
y3 = sin(x-0.5);
figure
plot(x,y1,'g',x,y2,'b--o',x,y3,'c*')
In the above example, x has 21 values, so when this plot is generated you will see 21 markers. I hope this helps!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by