Hi guys,
I am trying to plot a 3D scatter diagram using a .csv file. However, I have faced some difficulties while I was trying to arrange the color mapping of the diagram. Attached below is the .csv file and the current plot of the code. I am hoping the range of the color legend will be based on the z-component of the data, similar to the second images below.
Your help will be much apprecated.
clc; clear all; close all;data= importdata('ScanData.csv');x=data(:,1);y=data(:,2);z=data(:,3);%scatter3(x,y,z);
markerColors = jet(length(z));colorbarscatter3(x, y, z, 1, markerColors, 'filled')grid onxlabel('x');ylabel('y');zlabel('z');title('3D Plot')
Best Answer