What property of a line is related to the transparency / opacity or alpha of a line?
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Robbin van Hoek
il 14 Ott 2020
Commentato: Ameer Hamza
il 17 Ott 2020
when i plot a line with transparency by means of rgba color triplet and opacity.
hline = plot(x,y,'color',[1,0,0,0.5])
What property of the resulting handle is changed? I cannot find anything in the color triplet, nor can i find a seperate property like 'Alpha' or 'FaceAlpha' or anything similar.
0 Commenti
Risposta accettata
Ameer Hamza
il 14 Ott 2020
Modificato: Ameer Hamza
il 14 Ott 2020
This is an undocumented feature in MATLAB: http://undocumentedmatlab.com/articles/plot-line-transparency-and-color-gradient
You can access the alpha value using this line
alpha_val = hline.Edge.get.ColorData(4)
It is in uint8, you can convert to double
alpha_val = double(hline.Edge.get.ColorData(4))/255
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!