How to make errorbar transparent?
显示 更早的评论
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 个评论
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
2019-7-25
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
2020-9-3
it works for plot, but not when you use it on the function errorbar()
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Errorbars 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
