亲爱的们,我在MatLab中有如下图:
X轴表示Angular 。我想添加Angular 度,这是x轴刻度上的小圆圈,我需要优雅地分布x轴的值,而不是如上所示,它们彼此接近。有什么需要帮忙的吗?
VEC_MIS = [0.238000000000000.1.18980000000000.2.14160000000000.4.997000000,000.6.90070000000000.10.70790000000.14.5152000000,000.16.89470000,000.23.31950000000000
Vec_BEAM = [113.265900000000,117.549100000000,117.549100000000,117.787000000000,117.787000000000,117.787000000000,117.787000000000,117.787000000000,117.787000000000,117.787000000000,117.787000000000,117.787000000000];
Vec_NOBEAM = [0.238000000000000,1.18980000000000,2.14160000000000,4.99700000000000,4.99700000000000,8.80430000000000,10.7079000000000,14.5152000000000,16.4188000000000,19.2742000000000,21.1779000000000,23.5574000000000];
ThetaHalf = [5,10,15,20,25,30,35,40,45,50,55,60];
figure
semilogx(ThetaHalf,Vec_BEAM, '-dg' ,ThetaHalf,Vec_NOBEAM, '-^r' ,ThetaHalf,Vec_MIS, '-Oc' , 'LineWidth' ,2, 'MarkerEdgeColor' , 'b' )
xticks(ThetaHalf)
xlabel( '\theta_1_/_2' );
ylabel( 'Coverage area m^2' );
legend( 'With Beam' , 'Without Beam' , 'Manual' )
grid on ;
1条答案
按热度按时间iih3973s1#
如果要将度数符号添加到每个xtick,则只需使用以下命令指定xtick的“度”格式;
More on the xtickformat function
至于改变xtick之间的距离,据我所知,没有一种简单的方法可以做到这一点。我知道有两种选择,一种是使用xtickole函数更改xtick的Angular ,以减少它们的重叠;
More on the xtickangle function
另一种方法是指定xtick以避免重叠xtick,这可以使用xticks函数来完成;
More on the xticks function