Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Y-axis in MATLAB bar plot is hidden

Tags:

matlab

I am drawing a simple bar diagram in MATLAB. The problem is, that the value at x = 0 lets the y-axis disappear partially. Is there a way to bring the y-axis to the front instead of hiding between the y-value for x=0? Is there any option I can make sure the y-axis is always in the front?

like image 702
Claus Avatar asked May 25 '10 15:05

Claus


People also ask

How do I hide axis ticks in MATLAB?

TickLength = [0 0]; This will allow you to keep the labels but remove the tick marks on only the x-axis.

How do you display a bar graph in MATLAB?

Call the bar function to display the data in a bar graph, and specify an output argument. The output is a vector of three Bar objects, where each object corresponds to a different series. This is true whether the bars are grouped or stacked.


1 Answers

This here does the trick for anyone who faces the same problem in the future: set(gca,'layer','top')

like image 62
Claus Avatar answered Oct 07 '22 02:10

Claus