Claude Monet
Claude Monet

Reputation: 143

How to remove x axis from bar graph in Matlab?

I would like to remove x and y-axis from bar graph in Matlab, but x-axis is still visible and I can't find the reason why.

x = [1 2 3 4 5];

b = bar(x);

axis off

enter image description here

Upvotes: 0

Views: 608

Answers (1)

Wouter
Wouter

Reputation: 61

This is actually the 'baseline' of the bar() function.

Use set(b,'ShowBaseLine','off'); to turn it off.

Upvotes: 3

Related Questions