Polarplot axis label: how to edit the value?

조회 수: 4 (최근 30일)
BeeTiaw
BeeTiaw 2018년 12월 21일
댓글: dpb 2022년 5월 25일
Expert,
Can anyone tell me how is it possible to change the radial axis label in polarplot function? I want the original label to be subtracted by certain value, e.g. 1.0
I just to manipulate the axis label, without changing the value of the data or result. Thus, the plot will essential remain the same, just the label is "manipulated".
Suppose I have the following data:
x = linspace(0,2*pi);
y = cos(x)+ sin(x);
polarplot(x,y)
The results of that function is
Now, what I want is to change the original axis label [0 0.5 1.0 1.5] into [-1 -0.5 0 0.5].
How can we do that?
This is what I expect
Picture2.jpg

채택된 답변

dpb
dpb 2018년 12월 21일
hPP=polarplot(x,y); % plot, save handle
hPA=hPP.Parent; % retrieve polar axes handle (parent of polar plot)
hPA.RTickLabel=hPA.RTick-1; % rewrite radius tick labels as desired
hPA.RColor='r'; % change color
  댓글 수: 11
Cesim Dumlu
Cesim Dumlu 2022년 5월 25일
@dpb Thanks for the answer. Is it possible to modify the fontsize of rticks only ?
dpb
dpb 2022년 5월 25일
No, 'FontSize' is only one property for the polar axes object -- follow the links from the "See Also" link to the section on properties for the object -- or save the axes handle and click on the "show all properties" link that shows up in the command window if you display the handle value interactively.

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

추가 답변 (0개)

카테고리

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