The Matlab errorbar() function produces error bars with a fixed width in axis units. This makes it hard to zoom in on the plot. This code cleans up the behavior on zooming.
Chris Rodgers (2021). Update error bar widths automatically on figure resize (https://www.mathworks.com/matlabcentral/fileexchange/33734-update-error-bar-widths-automatically-on-figure-resize), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Nice trick for resizing.
Works perfectly, thank you!
Very helpful! Thanks!
Very nice entry!
I have one comment about your implementation. Your use of "handle" is not a fully supported syntax (undocumented), so I just want to make sure that you're aware of that. Using an unsupported syntax may break in future releases, so extra caution is required.
For your code, you might find the customization capability of "zoom" to be useful:
http://www.mathworks.com/help/techdoc/ref/zoom.html#brux2aq