Plot two overlapping surfaces on the same image
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi All,
I am trying to plot two surfaces, one being a transparent interpolated surface of a heart and the second being a solid subset of that surface representing a voxel of interest. For some reason I cannot get the voxel surface to show up the way I want it to. My code and relevant files are attached. I appreciate any assistance with this. Thank you so much!
5 commentaires
Réponse acceptée
Voss
le 20 Juil 2023
Does this seem right?
isochronal_crowding
delete([1 2]) % remove first two figures for clarity
You'll see the following in the code (lines 655-656):
p = trisurf(K,x_points',y_points',z_points',colorCategory,'FaceAlpha',1,'EdgeColor','none');
p.FaceVertexCData(~ismember(x_points,x_v)) = NaN;
That creates a second (solid) trisurf patch using all the points (same points used in the first (transparent) trisurf patch), but then the faces that are not in the low-voltage data (x_v, y_v, z_v) are set to NaN so they don't show up and only the transparent surface is seen in those regions.
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!