The difference between the MATLAB axis and the axes

Source: Internet
Author: User

Axis Chinese is the meaning of axis, which is used in MATLAB to control the range and style (color, etc.) of the axes.

Axis ([XMIN xmax ymin YMAX]) sets the range of the x-axis and y-axis of the currently painted image.
Axis ([XMIN xmax ymin YMAX zmin Zmax]) sets the range of the x-axis, y-axis, and z-axis of the currently painted image.

Example:

>> x = [1,2,3,4,5];
>> y = [2,3,4,5,6];
>> plot (x, y, ' o ')

>> axis ([0,5,0,6]);

Get the image

axes ★★★★★

Function

Creating a coordinate system drawing object

Grammar

Axes
Axes (' PropertyName ', PropertyValue,...)
Axes (h)
h = axes (...)

Describe

axes creates a coordinate system with default properties in the current window


axes ('PropertyName', PropertyValue,...) when you create a coordinate system, you specify some of its properties at the same time, no specified use of defaultaxes**, but can be set/read later using the Set/get function , the coordinate system axes all properties See Appendix


axes (h) Place the coordinate system h in the current coordinate system, set the currentaxes property in figure to H, and arrange H to the first axes position in the children property. By default, all graphical functions are plotted on the current coordinate system


h = axes (...) returns a handle to the coordinate system when it is created for later Operation

Attention

When you perform a drawing operation, matlab automatically creates a axes or Figure if there is no axes or figure

All properties are reset to defaultaxes** each time a new axes is created, and the axes section properties are reset each time the Advanced drawing command is called, such as Colororder, Linestyleorder, etc.

Set (figure_handle,defaultaxes**,value) can customize the default properties of axes

Axes is to create a coordinate system, and axis is a simple control of the coordinate system, such as shape, scale, etc.

There are three ways to specify attributes directly when you create them, with no precedence, case-insensitive, and consistent results

(1) Name/value pairing Form

Axes (' Position ', [0.2 0.2 0.6 0.6],' XGrid ',' on ',' Xticklabel ', [])

(2) Form of structural body

Pp. position=[0.2 0.2 0.6 0.6];

Pp. Xgrid=' on ';

Pp. Xticklabel=[];

Axes (PP)

(3) Cell tuple form

name={' Position ',' XGrid ',' Xticklabel '};

value={[0.2 0.2 0.6 0.6],' on ', []};

Axes (name,value)

Instance

% creates two coordinate systems, specifying certain parameters in the process

H1=axes (' Position ', [0.1 0.2 0.3 0.6], ' Unit ', ' normalized ', ' linestyleorder ', ': |--|-.| -‘);

H2=axes (' Position ', [0.6 0.2 0.3 0.6]);

% sets H1 to the current coordinate system, preparing for drawing

Axes (H1)

Plot (rand (10,3))% even though the Linetype order was modified when H1 was created, because each call to plot would reset the linestyleorder to '-', this is what is seen as a solid line

5 set H2 to the current coordinate system

Axes (H2)

[X,y,z]=peaks;

Mesh (x, y, z)

Set (H2, ' Visible ', ' off ')

The difference between the MATLAB axis and the axes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.