How to make errorbar transparent?
Afficher commentaires plus anciens
How can I make a plot with discrete errorbar points which are transparent?
This thread did not contain an answer: https://www.mathworks.com/matlabcentral/answers/381188-how-to-define-transparency-of-errorbar
4 commentaires
The errorbar objects do not have an alpha property and they do not respond to adding an alpha value in the 4th position of the RGB color vector which is an undocumented feature in other graphics objects.
This answer by Tom Lane has 14 votes which suggests it has helped people in the past but it provides shaded error regions rather than error bars. Another FEX alternative here.
supernoob
le 25 Juil 2019
Here's an alternative that will take a little work. You could create a function that has the same inputs as errorbar(). In that function you can create vertical lines that span from the lower to upper error limits for each point. That you're dealing with line objects and you'll be able to control their alpha values by adding an alpha value to the 4th position of the RGB color value.
h = plot();
h.Color = [h.Color, 0.5]; % for 50% transparency
Gino Delfe
le 3 Sep 2020
it works for plot, but not when you use it on the function errorbar()
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Errorbars dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
