フィルターのクリア

Figure positioning trouble on Ubuntu

3 ビュー (過去 30 日間)
Doug
Doug 2014 年 6 月 5 日
回答済み: Image Analyst 2014 年 6 月 6 日
I'm running Matlab R2013b on Ubuntu 12.04, and I've noticed that it's not possible to change on-screen figure sizes from the command line. That is, something like
mypos=get(gcf,'position');
set(gcf,'position',[mypos(1) mypos(2) mypos(3)+100 mypos(4)+100]);
which I'd expect to grow the figure by 100 pixels in each direction, has no effect. This works fine on every other Matlab installation I've used. Can anybody help? Has 2014a fixed this problem?
  3 件のコメント
Doug
Doug 2014 年 6 月 6 日
Maybe you mean "undocking" instead of "unlocking"? The figure isn't docked. But after more experimenting, I found that if I
set(gcf,'resize','off');
(which disables resizing the window with the mouse), then I am able to resize from the keyboard, using commands like the one above. It's a good-enough workaround, if a strange one.
José-Luis
José-Luis 2014 年 6 月 6 日
Yes, undocking Matlab. Sorry about that.

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

回答 (1 件)

Image Analyst
Image Analyst 2014 年 6 月 6 日
You might have the units as "characters" or "normalized". If you want "pixels", try it this way:
set(gcf,'Units', 'Pixels', 'Position', [mypos(1), mypos(2,) mypos(3)+100, mypos(4)+100]);
Let us know if that works.

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by