Plot only markers without lines
1.540 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Rami
el 20 de Mzo. de 2014
Comentada: Ihaveaquest
el 22 de Ag. de 2022
Hello,
I have two matrices V(NXM) and g(NXM). I wish to plot each column in V (x axis) against each column in g(y axis). I must have the data plotted only as markers i.e without lines.
I tried 'LineStyle','none' but I didn't managed to "turn on" the marker stuff. I do not want to specify manually what markers to use beacuse I have many columns (which I will also plot on separate figures).
I thought that matlab can plot the markers and once it finished all the markers it will change color and restart the marker order.
so can I do this?
Thanks, Rami
0 comentarios
Respuesta aceptada
Más respuestas (3)
TheStranger
el 5 de Dic. de 2018
Hi!
I know it was like 4 years ago, but anyway.
You need to specify 'LineStyle', 'none'
3 comentarios
Esen Ozbay
el 1 de Jul. de 2021
Thanks so much! Just what I was looking for since scatter was working problematic.
Yash Doshi
el 23 de Feb. de 2021
Editada: Yash Doshi
el 23 de Feb. de 2021
You can also use the 'LineStyle','none' in the stem() function, and yes, MATLAB itself knows when to change markers for different columns, you just need to plot each column in a loop using (hold on).
Hope this answers and solves your query.
I know I have been very early in answering the question xD. But maybe it can be useful for anyone who sees this in the future.
0 comentarios
Rami
el 20 de Mzo. de 2014
2 comentarios
Friedrich
el 21 de Mzo. de 2014
The color is choosen like the plot command does it. Only the marker has to be set by yourself which is extremly easy, e.g.
x = linspace(0,3*pi,200);
y = cos(x)+ rand(1,200);
scatter(x,y)
hold on
x = 0:0.1:10
y = sin(x);
scatter(x,y,'*')
hold off
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!