How to hide y axis?

matlab, matlab-figure, yaxis

Solution

I know this is an old post, but the following also remove the tick marks which is probably what you want:

set(gca, 'YTick', []);

Problem

I plot a horizontal boxplot in MATLAB -- `boxplot(y, group,'orientation','horizontal')`, and then hide the y-axis using `set(gca,'box','off','ycolor','w')`. It looks fine on the screen - only the bottom x-axis is visible. But whenever I save the figure to file, using either the `print()` function or `matlabfrag.m`, the left y-axis reappears in the output file (although it doesn't show up in MATLAB's visualization of the figure). How can I keep this y-axis hidden?

Original source