I have found a solution! I scaled both the colour and *size* of my points so that the outer, less intense points are smaller than the inner, more intense points I want to see, so I can see past the outer layer!
How can I apply variable transparency to a plot using scatter3?
92 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Steffen Adria
am 4 Jul. 2011
Bearbeitet: Jacek Wodecki
am 11 Jul. 2024 um 11:12
I'm producing a 3D model, and interior points happen to be more interesting to me. I have a 4-column matrix representing (x,y,z,intensity), and I'm most interested in the high-intensity points; currently they're coloured by intensity. Can I make it so that the transparency of low-intensity points is increased (but I need them to still be visible)?
Thanks
2 Kommentare
Akzeptierte Antwort
Patrick Kalita
am 5 Jul. 2011
MATLAB doesn't allow you to control the transparency of markers.
If you don't have a tremendous number of data points you could try drawing small spherical surfaces at each data point. Then you could control the transparency of those surfaces. Here's a File Exchange submission that might help you get started.
6 Kommentare
Walter Roberson
am 4 Jun. 2017
In R2014a and earlier, scatter3() uses patches. In R2014b and later, it does not.
In R2014b and later, there is MarkerFaceAlpha property that can be used to set a single transparency for all of the points.
In R2014b and later, to adjust each of the transparencies individually, then if h is the handle returned by calling scatter3(),
N = h.MarkerHandle.FaceColorData;
N(4,:) = new transparency data, expressed as integer values from 0 to 255
h.MarkerHandle.FaceColorData = N;
Jacek Wodecki
am 17 Aug. 2022
Bearbeitet: Jacek Wodecki
am 11 Jul. 2024 um 11:12
it doesn't work, matlab 2021b
EDIT: still doesn't work until 2024a
Weitere Antworten (2)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!