フィルターのクリア

How to get the position of a plot

63 ビュー (過去 30 日間)
Jakob Sievers
Jakob Sievers 2012 年 11 月 27 日
Hi guys
I can get the position of the entire figure, or the axes easily, but I am interested in getting the position of the actual plot. That is: the inner rectangle. How do I go about doing that?
Cheers

採用された回答

Image Analyst
Image Analyst 2012 年 11 月 27 日
axesPosition = get(axesHandle, 'Position');
There are a few different flavors of 'Position' - choose the one you want. You can use gca if you want the "current" (last used) axes. If you want the figure instead of the axes on the figure, you can use gcf instead of axesHandle.
  4 件のコメント
Jakob Sievers
Jakob Sievers 2012 年 11 月 27 日
編集済み: Jakob Sievers 2012 年 11 月 27 日
I had a look at it again and it appears that you are absolutely correct. The problem, though, is that I am doing "axis equal", "axis tight" and then the call for position: pos=get(gca,'position'); but it doesnt seem to have been updated to the new axes. How do I get around this?
Jakob Sievers
Jakob Sievers 2012 年 11 月 27 日
Googling around for a solution I stumbled across this handy tool which solves the problem very easily. Thanks again!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by