Error bars in legend
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear Matlab comunity,
I've been using Matlab for quite a short time to create better plots for my presentations. There is however something I have not found a way to solve: how to remove the error bars from a legend. Please look at the plot below. the legend not only has the marker but also an error bar which is quite annoying. I've been reading similar questions but haven't been able to find a proper answer. Could anyone help me find a way out in a simple way ?
By the way, I'm using Matlab R2019b
Thanks!

0 Kommentare
Antworten (1)
Walter Roberson
am 10 Apr. 2020
Use the form of legend() that has at least two outputs. This is important, because when there are two or more outputs, legend() constructs the objects a different way.
The second output will be an array of handles to graphics objects. If you are careful about which of those you pick out, you can change the graphics objects to make the bar invisible. Do not try to delete the graphics object that forms the bar: that would mess up the way that legend cross-references its objects.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!