Azzera filtri
Azzera filtri

Plot markers with equal distance on a linear chart?

2 visualizzazioni (ultimi 30 giorni)
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 Commento
mounika
mounika il 5 Dic 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!

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by