Make NaN values transparent

22 vues (au cours des 30 derniers jours)
Jakob Sørensen
Jakob Sørensen le 5 Avr 2012
Hi there,
Once again I must ask for your wisdom and guidance :)
Is there anyway to make NaN values transparent. More specifically I'm using the slice function, and then texture mapping with some images. These images have some NaN values, wich i would like do be transparent. Is that possible?
Thanks in advance!

Réponse acceptée

Walter Roberson
Walter Roberson le 5 Avr 2012
You can set the AlphaData and AlphaDataMapping associated with the surface plot created by slice()
In particular you could set it to
double(~isnan(TheImage))
which would be 0 exactly where there are nan.

Plus de réponses (0)

Catégories

En savoir plus sur Lighting, Transparency, and Shading 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!

Translated by