How to get smoother color using 3D data with colors using 'trisurf'?

16 views (last 30 days)
I have 4D data (3D (X, Y, Z) and color (C) data) which I use to plot with 'trisurf' function. The colors obtained for the surface using the same color data is not matching with what is received using 'scatter3'. How can I get smoother color results?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 May 2020
You can use the 'boundary' function. Following steps can achieve the desired functionality:
K = boundary(X, Y, Z, 0.7);
figure;
trisurf(K,X,Y,Z,C,'EdgeColor','none')
title('Using Boundary function')
axis equal
For more information about this function, refer to the following documentation link:

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!