![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235377/image.png)
How to draw an "error bar" between two points on a scatter plot
3 次查看(过去 30 天)
显示 更早的评论
Hi All,
I am plotting gps corrdinates on an x/y scatter plot. Based on some statistics I ran, the gps corrdinates could be slighty off resulting in the posibility of the current gps location being slighty ahead or behind the estimated location.
I would like to show this error on the scatter plot by plotting an "error bar" of sorts.
My question is:
How would I go about plotting a line between points (x1, y1) and (x2, y2) that looks like an error bar?
Thanks,
Zach
1 个评论
Star Strider
2019-8-26
Zachary Ferrie commented:
I really want to plot a line between two points that has the look of an error bar. I don't need any of the errorbar() fuctionality because I know what points I want to plot my line between. I really just want to be able to draw a line between any two points that I specify that looks like an error bar. I have drawn a picture that hopefully helps make things more clear.
Thanks,
Zach
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235377/image.png)
采纳的回答
the cyclist
2019-8-26
I think you might be able to get something pretty close to what you want using the doublearrow annotation. (There is a property governing what the arrowheads look like; I don't think any are a truly flat end like an errorbar, but maybe you don't care.)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!