How can I make a scatter plot with different markers ?

63 visualizaciones (últimos 30 días)
Hi;
I want to make a scatter plot with different markers for the attached .txt file?
I want to show the three values in one graphic with for example "circle", "rectangular" and "diamond" as a scatter plot.
Could you please help me about Matlab code for this graphic?
Thanks a lot..

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Mayo de 2020
scatter() can only specify one marker shape for each scatter object, so you will need to make multiple calls.

Más respuestas (1)

Stijn Haenen
Stijn Haenen el 19 de Mayo de 2020
Editada: Stijn Haenen el 19 de Mayo de 2020
maybe somthing like this:
symbol_list=['*';'+';'o';'<'];
for i=1:4
scatter(x(:,i),y(:,i),symbol_list(i))
hold on
end

Categorías

Más información sobre Scatter 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