plot of markers, having different color in one line of code.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
mikkel stær
el 14 de Mzo. de 2021
Respondida: ANKUR KUMAR
el 15 de Mzo. de 2021
hi why can i not do the following. when it follows the rules from the "plot" command sytax
i want one line and write plot one time, with all the information inside.
since i already know that i could just write them seperately.
plot(x2,y2,".",'MarkerFaceColor',[0.500 0.3250 0.0500], "Markersize",20,x3,y3,".",'MarkerFaceColor',[0.8500 0.3250 0.0980], "Markersize",20)
or
plot(x2,y2,".",'MarkerFaceColor',[0.500 0.3250 0.0500],x3,y3,".",'MarkerFaceColor',[0.8500 0.3250 0.0980], "Markersize",20)
is there a way to nest with () or [] or {} pls help.
0 comentarios
Respuesta aceptada
ANKUR KUMAR
el 15 de Mzo. de 2021
x2=[1,3];
y2=[3,4];
x3=[3,4,5];
y3=[1,6,7];
cell_values={x2,y2;x3,y3};
col_vals={[0.500 0.3250 0.0500],[0.8500 0.3250 0.0980]};
for kk=1:size(cell_values,1)
plot(cell_values{kk,1},cell_values{kk,2},'kd','MarkerFaceColor',col_vals{kk})
hold on
end
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading 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!