Home > front end >  How to prevent axis off from removing the subtitle?
How to prevent axis off from removing the subtitle?

Time:10-28

How to prevent axis off from removing the subtitle? Nemely, I just want to remove the x, y axes but not the subtitle itself.

img = imread('cameraman.tif');
figure;
imagesc(img);
title('A');
subtitle('B');

If I add axis off at the end it gives me: (The subtitle B is gone...) enter image description here

CodePudding user response:

You can do the following:

img = imread('cameraman.tif');
figure;
imagesc(img);
title('A');
subtitle('B');
set(gca,'xtick',[]);
set(gca,'xticklabel',[]);
set(gca,'ytick',[]);
set(gca,'yticklabel',[]);
  • Related