Effacer les filtres
Effacer les filtres

Plot markers with equal distance on a linear chart?

2 vues (au cours des 30 derniers jours)
Zeinab Ahmadi93
Zeinab Ahmadi93 le 5 Déc 2017
Commenté : mounika le 5 Déc 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 commentaire
mounika
mounika le 5 Déc 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!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by