.figureの混合行列の文字を大きくしたい
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
混合行列を作成したのですが混合行列の中の文字(18.7%など)を大きくしたいです
.figで保存し,MATLABで表示し,編集→Axesプロパティ→Fontsizeを変更すると
タイトル名や縦の出力クラス、ターゲットクラスの文字の大きさは変わるのですが、混合行列の中の文字の大きさが変化しません
一応一つ一つクリックして変更することができるのですが時間がかかるためプログラムで変更したいです。
なにかいいほうほうはあるでしょうか。
0 Commenti
Risposte (1)
Kojiro Saito
il 6 Gen 2023
混同行列を作成するのにconfusionchart(Statistics and Machine Learning Toolbox)とplotconfusion(Deep Learning Toolbox)があって、confusionchartだとAxesプロパティからFontSizeを変更すれば枠の中の文字サイズが変更できるのですが、今回はplotconfusionを使った混同行列での文字サイズ変更ですね。
コードを書いて変更することができます。
plotconfusionで作成した混同行列を.figでファイル出力したものを使いますが、この回答にアップロードできるのが5MBまでなので、zipファイルにしたものをここでは使っています。
【変更前のFigure】
unzip('plotconfusionFig.zip')
openfig('plotconfusionFig.fig');
t = findobj('Type','Text'); % Textを抽出
num = length(t);
C = cell(num,1);
for k = 1:num
C{k} = 14; % フォントサイズを14に変更
end
[t.FontSize] = C{:}; % セル内の全てにフォントサイズ14を代入
【フォントサイズを14に変更した後のFigure】
Vedere anche
Categorie
Scopri di più su AI for Signals in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!