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?

 Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 20 Sep. 2018
Bearbeitet: KALYAN ACHARJYA am 20 Sep. 2018
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 Kommentare

MD
MD am 20 Sep. 2018
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?
KALYAN ACHARJYA
KALYAN ACHARJYA am 20 Sep. 2018
Bearbeitet: KALYAN ACHARJYA am 20 Sep. 2018
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.
Bravo!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by