Graphics Reference
In-Depth Information
2.3 Manipulating Graphics
Below, are commands that allow you to manipulate the axes of a graph, placement of it within the screen, their
appearance, their presentation from different points of view, etc.
axis([xmin x max ymin ymax]) assigns the minimum and maximum values for the X and Y
axes in the graphic.
axis('auto') assigns scaling for each axis based upon the actual range of values represented
in the plot, which is the default mode i.e., xmin=min(x), xmax=max(x), ymin=min(y),
ymax=max(y)
axis('manual') freezes the scaling of axes to the current settings, so that limits from placing
other graphs on the same axes (with hold in on ), do not change the scale.
V = axis gives the vector V of 4 elements the scale of the current graph is [xmin xmax ymin
ymax].
axis('xy') places the graph in Cartesian coordinate mode, which is the default, with the
origin at the bottom left of the graph.
axis('ij') sets the graph to matrix coordinate mode, where the origin is at the top left of the
graph, with i being the vertical axis increasing from top to bottom and j being the horizontal
axis increasing from left to right.
axis('square') the plotted rectangle becomes a square, so the figures will absorb the change
in scale.
axis('equal') makes the aspect ratio for all axes the same.
axis('normal') eliminates the options square and equal.
axis('off') eliminates labels and brands on the axes and grids, keeping the title of the chart
and the text applied using text with gtext.
axis('on') restores labels, marks and axes grids.
subplot (m, n, p) divides the graphics window in m x n subwindows and places the current
graphic window in the p-th position , beginning the count from the left top and from left to
right; then it goes to the next line until it is finished. For example, if m=3 and n=2 then p is
expected to be used with values between 1 and 6, with plots 1 and 2 being in the first row,
3 and 4 in the second, and 5 and 6 in the third row.
 
Search WWH ::




Custom Search