• Remix
  • Share
  • New Entry

on 12 Oct 2021
  • 2
  • 25
  • 0
  • 0
  • 129
% How can I add different colors in scatter3 plot
% https://www.reddit.com/r/matlab/comments/q3xy5n/how_can_i_add_different_colors_in_scatter3_plot/
%
% Requires R2021b
%
% ColorVariable can be passed in to set the color
% https://www.mathworks.com/help/matlab/ref/scatter3.html#btr5_il-1
tbl = readtable('patients.xls');
s = scatter3(tbl,'Systolic','Diastolic','Weight','filled', ...
'ColorVariable','Diastolic');
camva(2)
Remix Tree