如何将matlab图像中的坐标值升序或降序排列

在画图时,有时为了说明情况,需要将坐标值的值按升序或降序,命令如下

set(gca,'ydir','normal');

或者set(gca,'ydir','reverse'); 即可


如何将x轴的坐标值设置为需要的符号?

set(gca,'XTickLabel',{'One';'Two';'Three';'Four'})


让标题是某颜色

title('New Title','Color','r') % Make text color red
title({'This title','has 2 lines'}) % Two line title


TickDir

in | out

Direction of tick marks. For 2-D views,the default is to direct tick marks inward from the axis lines; 3-Dviews direct tick marks outward from the axis line.

TickDirMode

{auto} | manual

Automatic tick direction control. In auto mode, MATLAB directstick marks inward for 2-D views and outward for 3-D views. When youspecify a setting for TickDir, MATLAB sets TickDirMode to manual.In manual mode, MATLAB does not change thespecified tick direction.

TickLength

[2DLength 3DLength]

Length of tick marks. Specifies the lengthof axes tick marks. The first element is the length of tick marksused for 2-D views and the second element is the length of tick marksused for 3-D views. Specify tick mark lengths in units normalizedrelative to the longest of the visible x-, y-,or z-axis annotation lines.

TightInset

[left bottom right top] Read only

Margins added to Position to include text labels.The distances between the bounds of the Position propertyand the extent of the axes text labels and title. When added to the Position widthand height values, the TightInset defines thetightest bounding box that encloses the axes and its labels and title.


以上均在 Axes Properties


  • 5
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值