File Exchange

image thumbnail

Update Bar Plot Base

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

3 Downloads

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 (2019). Update Bar Plot Base (https://www.mathworks.com/matlabcentral/fileexchange/1200-update-bar-plot-base), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

Luis

Rustam

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

:(

Salem Ben

You can do that in one line:
set(get(h,'BaseLine'),'BaseValue',Value)
With:
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!

Updates

1.1.0.1

Updated license

1.2.0.0

add 2001 to copyright

1.1.0.0

BSD update

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