specific RGB color in plot3

2 views (last 30 days)
Alberto Acri
Alberto Acri on 21 Nov 2022
Edited: Dyuman Joshi on 21 Nov 2022
I want to use the gray color in the function 'plot3'.
I currently use this to apply the black color:
plot3(A(:,1), A(:,2), A(:,3), 'k.','Markersize',5);
Since the figure is composed of nodes of x,y,z coordinates, I tried this way but it creates gray lines on the 3D figure:
plot3(A(:,1), A(:,2), A(:,3), 'Colors', [0.7, 0.7, 0.7],'Markersize',5);

Accepted Answer

Dyuman Joshi
Dyuman Joshi on 21 Nov 2022
Edited: Dyuman Joshi on 21 Nov 2022
A=randi(100,10,3);
%Marker size 5 is a bit small for a good visual
plot3(A(:,1), A(:,2), A(:,3), 'LineStyle', 'none', 'Marker', '.',...
'Color', [0.7, 0.7, 0.7], 'Markersize', 7)

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!