MATLAB: Hiding x and y axes, but leaving top and right axes visible

plot axes hideaxes

I have a plot and I want to leave the top and right axes but hide the traditional x and y axes. I cannot figure out a way to do this. Any ideas? Thank you!

Best Answer

Hi Erik,
plot([0 1],[0 1])
set(gca,'XAxisLocation','top','YAxisLocation','right');
Is this what you want?