Add Text Tile to Tiled Layout

63 ビュー (過去 30 日間)
Jim McIntyre
Jim McIntyre 2023 年 11 月 13 日
コメント済み: Star Strider 2023 年 11 月 13 日
I'm creating a tiled layout with several graphs that all relate to a single set of data. The data has say a dozen common properties, for example, the specimen name, the date, the size of the specimen, etc.
In one of the tiles, I'd really like to display these as a block of text intead of a chart.
Is it possible to do that? How? I was thinking of using something like fprintf to create the formatted text.

採用された回答

Star Strider
Star Strider 2023 年 11 月 13 日
One approach —
x = 0:99;
y = randn(3,100);
figure
tiledlayout(2,2)
for k = 1:3
nexttile
plot(x, y(k,:))
grid
xlabel('X')
ylabel("Y")
title("Plot "+k)
end
nexttile
text(0.5,0.5, sprintf('Your\ntext\nhere'))
Ax = gca;
Ax.Visible = 0;
.
  2 件のコメント
Jim McIntyre
Jim McIntyre 2023 年 11 月 13 日
Perfect! Thanks.
Star Strider
Star Strider 2023 年 11 月 13 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by