Is this distance variable?

8 ビュー (過去 30 日間)
Christian Vering
Christian Vering 2016 年 1 月 13 日
コメント済み: Star Strider 2016 年 1 月 13 日
Dear Community,
in the picture you can see a distance. Is it possible to enlarge this distance, so that the graphic looks better?
Thanks for help and have a nice evening, Christian

採用された回答

Mike Garrity
Mike Garrity 2016 年 1 月 13 日
Yes and no.
The YLabel property of the axes is a handle to a text object, and you can set the Position property of that to move it around, but that can get a bit messy if the axes changes because you're both trying to control the same position.
The traditional trick here is to add an extra line to increase the gap:
ylabel({'My Label';' '})
You can fine-tune that by using tex interpreter (or latex) commands:
ylabel({'My Label';'\fontsize{24} '})
  1 件のコメント
Christian Vering
Christian Vering 2016 年 1 月 13 日
the first solutions works! Thank you all!

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

その他の回答 (2 件)

Adam
Adam 2016 年 1 月 13 日
編集済み: Adam 2016 年 1 月 13 日
hYLabel = ylabel( 'Some y label' );
then you can edit the ' Position' property of your hYLabel to move it horizontally or vertically. You may have to move the axes as well though as your label may end up off the screen otherwise.
e.g
hYLabel.Position(2) = -15;
  1 件のコメント
Christian Vering
Christian Vering 2016 年 1 月 13 日
The program is embedded in a gui. There is actually no way to try it this way without changing some boxes but thanks for the fast answer. I will keep this solution in mind!

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


Star Strider
Star Strider 2016 年 1 月 13 日
Also, if you want to use LaTeX syntax, you need to specify the LaTeX interpreter:
xlabel('$\rm{time}~[s]$', 'Interpreter','latex')
  2 件のコメント
Christian Vering
Christian Vering 2016 年 1 月 13 日
I am going to open that .pdf file with inkscape whichc exports it to a latex file! In this case it is possible to get the fontsize as in the text even if the image is scaled up or down
Star Strider
Star Strider 2016 年 1 月 13 日
It should be. Everything should scale, including the font size.

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

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by