Is it possible to create a 3-D surface plot with black edges and color shading on the faces that corresponds to the data points, instead of solid color faces?

1 view (last 30 days)
I would like to create a 3-D surface plot with black edges and color shading on the faces that corresponds to the value of each data point, so that only a portion of each face is shaded instead of each entire face being shaded a single solid color. Please see the 3-D plots shown in "3D_Plot_Example.png" as an example of what I would like in my 3-D plots. I included the "RedToBlue.mat" custom colormap file and "SoilMoisture2022Elevated_DM.csv" data file, which are required inputs in my "SoilData3DSurfPlots_2022.m" MATLAB code. Running this code yields the plot shown in the attached "SoilElev2022.png" file, and shows single solid colors on each grid face of the surface plot. Thank you!

Answers (1)

DGM
DGM on 19 Jan 2024
Simply do:
sa.FaceColor = 'interp';
That will make the face color graduated, while leaving the edge lines black.

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!