How can I manipulate the properties of a polar graph?

조회 수: 1 (최근 30일)
Jonas
Jonas 2011년 3월 4일
I am ploting a polar graph and would like to change various properties. Mainly remove and/or the polar axis labels.
I manage to get the gca handles, but I am not able to find which one correspond to these properties.
Thank you

채택된 답변

Jan
Jan 2011년 3월 4일
The labels for the radius and angle are TEXT objects with the 'HandleVisibility' set to 'off'. You can get their handles by:
AllText = findobj(allchild(gca), 'flat', 'type', 'text');
It might be easier to create a local copy of "polar.m" using a new name and disable the creation of the labels manually. Or you can add the tag 'radius_label' to the radius labels, such that you can let the above FINDOBJ command find them.

추가 답변 (2개)

Jonas
Jonas 2011년 3월 4일
thank you,
I assume now that if I want to manipulate the axes handles, I should follow a similar procedure (especially to remove some of them).
However I am not sure of the way matlab is storing the handle of the polar axis.
  댓글 수: 1
Jan
Jan 2011년 3월 4일
You can use "set(0, 'ShowHiddenHandles', 'on')" to enable the visibility of hidden handles. Then "children(gcf)", "children(gca)" and the same for the replied child objects reveal the internal storage: There is one invisible AXES object, while the visible radius and angle lines are LINE objects, the white background is a PATCH and the labels are created by TEXT. All visible objects are children of the single AXES object.

댓글을 달려면 로그인하십시오.


Jonas
Jonas 2011년 3월 4일
thank you for the quick answer.
In the end I found it easier to manipulate the polar.m file directly so that the drawn graph was rotated at creation and with the type of axes I wanted.
  댓글 수: 1
Jan
Jan 2011년 3월 4일
You are welcome. Does this mean, that you accept my answer?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Polar Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by