I have drawn a 3D plot in matlab, but I need the code so that the each marker of the plot has different colors, normally markers has only one color for all ,but I need different markers with different colors?
Ältere Kommentare anzeigen

1 Kommentar
Star Strider
am 14 Aug. 2015
Post your code with your question, not in the ‘Tags’ field!
Antworten (1)
Mike Garrity
am 14 Aug. 2015
The plot3 command won't do a separate color per vertex, but you can use hold to add a scatter to your plot:
theta = linspace(0,2*pi,32);
x = cos(theta);
y = sin(theta);
z = cos(3*theta);
plot3(x,y,z)
hold on
scatter3(x,y,z,[],theta,'filled')
box on
grid on

Kategorien
Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!