12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure PropertiesColormapm-by-3 matrix of RGB valuesFigure colormap. This property is an m-by-3 array of red, green, and blue(RGB) intensity values that define m individual colors. <strong>MATLAB</strong> accessescolors by their row number. For example, an index of 1 specifies the first RGBtriplet, an index of 2 specifies the second RGB triplet, and so on. Colormaps canbe any length (up to 256 only on MS-Windows), but must be three columnswide. The default figure colormap contains 64 predefined colors.Colormaps affect the rendering of surface, image, and patch objects, butgenerally do not affect other graphics objects. See colormap and ColorSpec formore information.CreateFcnstringCallback routine executed during object creation. This property defines acallback routine that executes when <strong>MATLAB</strong> creates a figure object. You mustdefine this property as a default value for figures. For example, the statement,set(0,'DefaultFigureCreateFcn',...'set(gcbo,''IntegerHandle'',''off'')')defines a default value on the root level that causes the created figure to usenoninteger handles whenever you (or <strong>MATLAB</strong>) create a figure. <strong>MATLAB</strong>executes this routine after setting all properties for the figure. Setting thisproperty on an existing figure object has no effect.The handle of the object whose CreateFcn is being executed is accessible onlythrough the root CallbackObject property, which you can query using gcbo.CurrentAxes handle of current axesTarget axes in this figure. <strong>MATLAB</strong> sets this property to the handle of thefigure’s current axes (i.e., the handle returned by the gca command when thisfigure is the current figure). In all figures for which axes children exist, thereis always a current axes. The current axes does not have to be the topmost axes,and setting an axes to be the CurrentAxes does not restack it above all otheraxes.You can make an axes current using the axes and set commands. For example,axes(axes_handle) and set(gcf,'CurrentAxes',axes_handle) both makethe axes identified by the handle axes_handle the current axes. In addition,axes(axes_handle) restacks the axes above all other axes in the figure.2-170

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!