2017-01-22 44 views
2

有誰知道如何修改Matlab rose函數僅顯示 範圍從0到pi/2(0-90º)?在MATLAB中調整玫瑰圖的顯示部分

我似乎無法在任何地方找到它。 xlimylim似乎不工作

+0

是的,我只想要1/4所示,或1/2 .. 。不是整個圓(0-360º)。 – ana

回答

2

可以使用父axesXLimYLim屬性來調整顯示器,使得它只能顯示第一象限。

hax = axes(); 
theta = [0.4 1.4 3.1 2.3 0.4 2.5 3.9 2.8 2.3 1.6 4.6 4.5 6.1 3.9 5.1]; 
rose(hax, theta, 10) 

% Set the x and y limits to show only the first quadrant 
hax.XLim = [0 hax.XLim(2)]; 
hax.YLim = [0 hax.YLim(2)]; 

enter image description here

相反,如果你想0到pi(180度)

hax = axes(); 
rose(hax, theta, 10) 

% Set only the y limits 
hax.YLim = [0 hax.YLim(2)]; 

enter image description here

+0

這工作!非常感謝!! – ana