Move axis labels to bottom but keep axis at origin

I am currently trying to recreate a bar graph similar to this one:
My graph already looks very similar but I cannot figure out how to move the x-tick labels to the bottom of the figure.
How can I move them to the bottom?

 Accepted Answer

In the figure you have provided, the modified baseline is 1
You can modify the base kine of the bar see the example
Y=[5,4,1,5];
b=bar(Y);
b(1).BaseValue=2;
More detail number of levels and differnt colors- check here

4 Comments

Oh wow! That was almost ridiculously easy. I actually changed the axis and then adjusted the y-tick labels. That makes the whole process redundant. Thanks!
Unfortunately, it leaves the thin black line at the base value (1):
Is there a way to remove it?
Share more detail, definitely, I will try to help you.
It was definitely what I was looking for. Thanks!
I was trying to remove the baseline but I already figured it out.
b.BaseLine.LineStyle = 'none';
This does the trick.

Sign in to comment.

More Answers (0)

Products

Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!