View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Update error bar widths automatically on figure resize

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

Update error bar widths automatically on figure resize



11 Nov 2011 (Updated )

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

| Watch this File

File Information

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.


Adjust Error Bar Width inspired this file.

This file inspired Superbar.

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 (6)
04 Nov 2014 Cengiz Gunay

Nice trick for resizing.

14 May 2014 Luuk

Luuk (view profile)

Works perfectly, thank you!

07 May 2013 Sadegh Bakhtiarzadeh

09 Jan 2012 AMD

AMD (view profile)

Very helpful! Thanks!

Comment only
09 Jan 2012 AMD

AMD (view profile)

21 Nov 2011 Jiro Doke

Jiro Doke (view profile)

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:

11 Nov 2011 1.1

Include errorbar_tick.m in the zip file for convenience.

Contact us