How do I hide axes and ticks in matlab without hiding everything else

I support the

set(gca,'xtick',[],'ytick',[]);

approach over the

axis off

one. The reason is set(gca, ...) just removes the labels but keeps the axes, unlike axis off. I am generating a group of images with fixed dimensions to combine later into a video. Deleting the axes creates different size frames that can't be recombined.


axis off;

Is this what you are looking for?

This is definitely somewhere else on this website and in the matlab documentation. Try typing

help plot

Or using the documentation on plotting!

edit: Now that you have shown what you are doing. (You don't need the handles, I just always write them in to clutter my workspace)

myImage = yurbuds0x2Dironman; # don't ask
fH = figure;
iH = imagesc(myImage);
set(gca,'xtick',[],'ytick',[])

Are you able to do it like this?

Tags:

Matlab