

The right figure shows a more satisfactory plot after typing Use the automatic scaling of the y-axis based on ymax = tan(1.57), which is well over 1000: If XLimMode, YLimMode, or ZLimMode is manual, mode is manual. Mode is auto if XLimMode, YLimMode, and ZLimMode are all set to auto. Returns three strings indicating the current setting of axes properties: Turns on all axis lines, tick marks, and labels.Īpplies the axis command to the specified axes. Turns off all axis lines, tick marks, and labels.

MATLAB adjusts the x-axis, y-axis, and z-axis so that they have equal lengths and adjusts the increments between data units accordingly.įreezes aspect ratio properties to enable rotation of 3-D objects and overrides stretch-to-fill.Īutomatically adjusts the aspect ratio of the axes and the relative scaling of the data units so that the plot fits the figures shape as best as possible.

Makes the current axes region square (or cubed when three-dimensional). Is the same as axis equal except that the plot box fits tightly around the data. The aspect ratio of the x-, y-, and z-axis is adjusted automatically according to the range of data units in the x, y, and z directions. Sets the aspect ratio so that the data units are the same in every direction. The y-axis is vertical with values increasing from bottom to top. The x-axis is horizontal with values increasing from left to right. The j-axis is horizontal with values increasing from left to right.ĭraws the graph in the default Cartesian axes format with the coordinate system origin in the lower-left corner. The i-axis is vertical, with values increasing from top to bottom. Places the coordinate system origin in the upper-left corner. This option has an effect only if PlotBoxAspectRatioMode or DataAspectRatioMode are manual. Sets the axis limits and PlotBoxAspectRatio so that the axes fill the position rectangle. Sets the axis limits to the range of the data. This sets the XLimMode, YLimMode, and ZLimMode properties to manual. For example, axis 'auto x' computes only the x-axis limits automatically axis 'auto yz' computes the y- and z-axis limits automatically.įreezes the scaling at the current limits, so that if hold is on, subsequent plots use the same limits. You can restrict this automatic behavior to a specific axis. Sets MATLAB to its default behavior of computing the current axes' limits automatically, based on the minimum and maximum values of x, y, and z data. The returned values are the current axes' XLim, Ylim, and ZLim properties. v has four or six components depending on whether the current axes is 2-D or 3-D, respectively. Returns a row vector containing scaling factors for the x-, y-, and z-axis. Sets the x-, y-, and z-axis limits and the color scaling limits (see caxis) of the current axes. Sets the limits for the x- and y-axis of the current axes. = axis('state')Īxis manipulates commonly used axes properties.Axis (MATLAB Functions) MATLAB Function ReferenceĪxis()
