Borrar filtros
Borrar filtros

Plot markers with equal distance on a linear chart?

2 visualizaciones (últimos 30 días)
Zeinab Ahmadi93
Zeinab Ahmadi93 el 5 de Dic. de 2017
Comentada: mounika el 5 de Dic. de 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 comentario
mounika
mounika el 5 de Dic. de 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!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by