I have a data set consisting of 4 points. Each point has 4 columns. I want to plot that data set with 4D color function where 4th column of each dataset will be plotted by the color function. The range of the 4th column is {2, 9}
. However the PlotLegends
bar is showing values ranging {0, 1}
.
rs13pts1 = {{1, .2, .6, 6}, {1.2, .4, .8, 7}, {1.4, .6, 1, 8}, {1.6, .8, 1.2, 9}};
Block[{i = 1},
ListPointPlot3D[rs13pts1[[All, ;; 3]], PlotRange -> All,
ColorFunction ->
Function[{x, y, z},
ColorData["RedGreenSplit"][rs13pts1[[i++, 4]]]],
PlotLegends -> BarLegend["RedGreenSplit"]]]