How to prevent axis off from removing the subtitle?

6 ビュー (過去 30 日間)
hmhuang
hmhuang 2021 年 10 月 27 日
コメント済み: Chris 2021 年 10 月 27 日
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...)

回答 (1 件)

Chris
Chris 2021 年 10 月 27 日
編集済み: Chris 2021 年 10 月 27 日
img = imread('cameraman.tif');
figure;
tiledlayout(1,1)
imagesc(img);
title('A');
subtitle('B');
axis off
tiledlayout requires R2019b or newer.
  1 件のコメント
Chris
Chris 2021 年 10 月 27 日
For older versions of Matlab:
img = imread('cameraman.tif');
figure;
subplot(1,1,1)
imagesc(img);
title('A');
subtitle('B');
axis off

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by