フィルターのクリア

how to make the figures labels centered within the figure limits?

4 ビュー (過去 30 日間)
Alaa Hameed
Alaa Hameed 2018 年 4 月 6 日
回答済み: Walter Roberson 2018 年 4 月 12 日
Hi, I created a figure with several subplots (as shown in the attachment). The problem is the subplots labels are extended over their neighbors. How to over come this issue, please? The other thing is that the text in red I want to center it ?
Thanks,

回答 (2 件)

Gayatri Menon
Gayatri Menon 2018 年 4 月 9 日
Hi,
You could try changing the font size of the labels.For this, you could use 'FontSize' property.For changing the Text color use 'Color' property. For more information, please refer the below link:
Hope the above helps.
Thanks
  1 件のコメント
Alaa Hameed
Alaa Hameed 2018 年 4 月 12 日
Thanks Gayatri for your answer. That may solve a part of the problem, but it is still not answering my question. What I wanted is that the label dose not go beyond the axis limits, as shown in the figure!

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


Walter Roberson
Walter Roberson 2018 年 4 月 12 日
Create a uipanel around each subplot. The clipping imposed by the panel will clip the y labels.
Or... change the labels to be less wide. For example, put \newline into them to cause them to span multiple lines, such as
ax1.YLabel.String = 'you know what? This \newline is a really pretty silly \newline long y label would you \newline not say?'
which breaks the label up over 4 lines. Then you start worrying about headroom in the width, but the label remains visible.
With regards to the red text: At the moment you have set the Position for it to be [0 0.5 0] in each case. Instead use [0.5 0.5 0], and set the HorizontalAlignment property to 'center'

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by