How to use RGB with Plot3?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Bolin
am 17 Apr. 2017
Beantwortet: Image Analyst
am 17 Apr. 2017
I am simply trying to plot a point using Plot3 with a specific RGB color
plot3(1,2,3, 'Color',[255 153 51],'x')
This should give me an orange cross
After running this line, I get "Error using plot3, Not enough input arguments"
I've read the documentations and saw how other people implemented this, and I couldn't figure out where I went wrong. Help!
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 17 Apr. 2017
Your color is messed up - you need to divide by 255 to get the color values in the range of 0-1. This works fine:
plot3(1, 2, 3, 'x', 'Color', [255, 153, 51] / 255, 'MarkerSize', 30, 'LineWidth', 3);
grid on;
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!