フィルターのクリア

How to increase font size confusionchart plot

48 ビュー (過去 30 日間)
Devendra
Devendra 2023 年 7 月 4 日
回答済み: Sreeram 2024 年 8 月 7 日 11:28
I am using following MATLAB lines to draw confusion chart
cm = confusionchart(Z,ZZ,'RowSummary','row-normalized','ColumnSummary','column-normalized');
cm.FontSize = 18;
cm.Title = 'Confusion matrix';
This fontsize increases the size of overall confusionchart barring right hand side separated row matrix.
Please suggest me how to do it for all parts of confusion chart.
Devendra
  2 件のコメント
Image Analyst
Image Analyst 2023 年 7 月 4 日
編集済み: Image Analyst 2023 年 7 月 4 日
Post Z and ZZ so we can run your code. Or at least post a screenshot.
For what it's worth, I'm attaching a demo for how to change various parts of a plot separately.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
Devendra
Devendra 2023 年 7 月 4 日
Z ZZ
2 1
1 2
2 2
2 3
2 2
1 2
1 3
2 2
2 2
3 2
2 2
2 2
2 2
2 2
2 2
2 1
2 2
2 2
1 2
3 2
2 2
3 1
2 2
2 2
2 2
2 2
2 2
2 2
2 2
2 2
1 2
3 2
2 2
3 2
2 2
2 2
2 2
1 2
2 2
2 2
2 2
2 2
2 2
3 2
3 3
3 2
2 2
2 2
2 2
2 2
2 2
2 2
3 2
3 2
2 2
3 3
3 2
2 2
2 2
2 3
2 2
1 2
2 2
2 2
2 2

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

回答 (1 件)

Sreeram
Sreeram 2024 年 8 月 7 日 11:28
Hi Devendra,
I believe that you are trying to increase the font size of all parts of the confusion chart but notice that the font size of right-hand side separated row summary matrix remains small.
Based on my observations, it appears that the font sizes are limited by the width (and height) of their cells. When the window is maximized, the font size increases as the cell width increases.
To address this issue, you can try any of the following:
1. Ensure that the window width is large enough so that the cells are wide enough to accommodate the bigger font. You can have the figure maximized programmatically using the following command:
cm.Parent.WindowState = 'maximized';
2. You may consider creating a custom confusion chart function using MATLAB’s plotting functions, which gives you full control over the appearance of each element. For this, you can leverage the MATLAB’s confusionchart function itself to get your values. The documentation for confusionchart may be found here:
I hope this helps.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by