different colour combinations in matlab
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
how to plot 20 different points in the plot in 20 different colours?
0 Kommentare
Antworten (2)
Chad Greene
am 13 Aug. 2014
Use scatter. The syntax is scatter(x,y,Size,Colors). Size is the size of the markers and Colors can be 20 rgb values as in Example 1 here .
0 Kommentare
Amir
am 13 Aug. 2014
Sindhu, use this code:
x=[1:20]./7;
y=sin(x);
hold on
for i=1:length(x)
plot(x(i),y(i),'*',...
'color', rand(1,3))
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!