File Exchange

image thumbnail

Update Bar Plot Base

version (1.46 KB) by Ben Hinkle
Move a barplot's base value.


Updated 01 Sep 2016

View License

An M-file to move the base value for bar and hist plots from 0 to any value. Especially useful for log-scale bar plots.

Cite As

Ben Hinkle (2020). Update Bar Plot Base (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)



Invalid axes property: 'BaseValue'.
Invalid axes property: 'BaseLine'.


Salem Ben

You can do that in one line:
h=handle of plot(bar, stem...etc)
Value= I put 1 just to avoid negative log values

Brian Hansen

Thank you for posting this useful code!

Jason Alexander

This is a lifesaver!! Thanks so much.

S Kellner

Great, thank you so much!

Jan Schellekens

Perfect, I have been looking for hours to get this done!! Keep up the good work.

Cyrille Berton

Beautiful ! That you very much.

Shawna Thomas

This was exactly what I needed. Thanks!

Scott Stanley

This beautifully compact bit of code solves a problem that has been driving me crazy for days now. Thank you Ben!


Updated license

add 2001 to copyright

BSD update

MATLAB Release Compatibility
Created with R12
Compatible with any release
Platform Compatibility
Windows macOS Linux