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

来源:互联网 发布:java常用的技术有哪些 编辑:程序博客网 时间:2024/05/21 06:58

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

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 forTickDir, 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-,orz-axis annotation lines.

TightInset

[left bottom right top] Read only

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


以上均在 Axes Properties


0 0
原创粉丝点击