【发布时间】:2020-02-16 08:28:54
【问题描述】:
【问题讨论】:
标签: matlab plot matlab-figure axes
【问题讨论】:
标签: matlab plot matlab-figure axes
要将其从 -90° 设置为 90°,只需将其从 -90° 设置为 90°,即
%Creating a random polar plot with same ThetaDir and ThetaZeroLocation as yours
theta = linspace(0, 2*pi);
rho = rand(1, 100);
polarplot(theta, rho);
ax = gca;
set(ax,'ThetaDir', 'clockwise', 'ThetaZeroLocation', 'top');
%Setting the desired limits
thetalim([-90 90]);
如果您想为theta 设置正值,则可以按如下方式更改刻度标签:
ax.ThetaTickLabel = wrapTo360(ax.ThetaTick); %requires Mapping Toolbox
% or without Mapping Toolbox:
% ax.ThetaTickLabel(ax.ThetaTick<0) = split(num2str(ax.ThetaTick(ax.ThetaTick<0) + 360));
【讨论】: