Code covered by the BSD License  

Highlights from
Update error bar widths automatically on figure resize

5.0

5.0 | 4 ratings Rate this file 23 Downloads (last 30 days) File Size: 19.3 KB File ID: #33734
image thumbnail

Update error bar widths automatically on figure resize

by

 

11 Nov 2011 (Updated )

Add callback to the current axis to maintain a sensible error bar width on zooming.

| Watch this File

File Information
Description

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.

Acknowledgements

Adjust Error Bar Width inspired this file.

MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
14 May 2014 Luuk

Works perfectly, thank you!

07 May 2013 Sadegh Bakhtiarzadeh  
09 Jan 2012 AMD

Very helpful! Thanks!

09 Jan 2012 AMD  
21 Nov 2011 Jiro Doke

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

Updates
11 Nov 2011

Include errorbar_tick.m in the zip file for convenience.

Contact us