how to control the BackgroundAlpha of the text box
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Is there a way to create a text box with BackgroundAlpha (such as 0.5)? I can't find the alpha option for text box background in Text Properties.
0 Commenti
Risposta accettata
Les Beckham
il 20 Ago 2025
You can use the undocumented feature of a 4-element color spec (the fourth element is the alpha). For example:
plot([0 1], [0 1]);
ht = text(0.45 ,0.5, 'This is a test');
set(ht, 'EdgeColor', [0 0 0], 'BackgroundColor', [1 0 0 0.4]);
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Annotations 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!