How to prevent axis off from removing the subtitle?

2 vues (au cours des 30 derniers jours)
hmhuang
hmhuang le 27 Oct 2021
Commenté : Chris le 27 Oct 2021
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...)

Réponses (1)

Chris
Chris le 27 Oct 2021
Modifié(e) : Chris le 27 Oct 2021
img = imread('cameraman.tif');
figure;
tiledlayout(1,1)
imagesc(img);
title('A');
subtitle('B');
axis off
tiledlayout requires R2019b or newer.
  1 commentaire
Chris
Chris le 27 Oct 2021
For older versions of Matlab:
img = imread('cameraman.tif');
figure;
subplot(1,1,1)
imagesc(img);
title('A');
subtitle('B');
axis off

Connectez-vous pour commenter.

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by