Borrar filtros
Borrar filtros

how to change color for one point in the scatter plot

9 visualizaciones (últimos 30 días)
TESFALEM ALDADA
TESFALEM ALDADA el 10 de Nov. de 2020
Editada: KSSV el 10 de Nov. de 2020
I wanted to separatly color the markers in scatter plot.
e.g i ahve a date:
a=[1:10]'; b=[11:20]';
scatter(a,b,'o','filled');
here i wanted to change the color only for data in the row five (the circled one).
I appreaciate for you help

Respuesta aceptada

Alan Stevens
Alan Stevens el 10 de Nov. de 2020
a=[1:10]'; b=[11:20]';
scatter(a,b,'o','filled');
hold on
plot(a(5),b(5),'ro','MarkerFaceColor','r')

Más respuestas (1)

KSSV
KSSV el 10 de Nov. de 2020
Editada: KSSV el 10 de Nov. de 2020
a=[1:10]'; b=[11:20]';
scatter(a,b,'o','filled');
hold on
scatter(a(4),b(4),'or','filled')
Also you can use plot
a=[1:10]'; b=[11:20]';
plot(a,b,'.','MarkerSize',20);
hold on
plot(a(4),b(4),'.r','MarkerSize',20);

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