- •Color control
- •Interpolated shading, which is also known as Gouraud shading, is
- •Variant of colordef.
- •Is less than or equal to 256. If the length of newmap is
- •Lighting
- •View direction.
- •Values can be set with a single statement.
- •Color maps
- •Increasing m increases the granularity emphasized by the map.
- •In the hsv map. However, prism uses repeated copies of its six
- •Implicit arguments (similar to handle callbacks):
- •If strcmpi(objTag,'DoNotIgnore')
- •Implicit arguments (similar to handle callbacks):
- •If strcmpi(objTag,'DoNotIgnore')
- •Camera control
- •High level camera control
- •In dtheta and dphi (both in degrees). Dtheta is the horizontal
- •Is moved. If targetmode is 'movetarget' (the default), both the
- •If zf is greater than 1, the scene appears larger. If zf is
- •High level light control
- •Vertical elevation (both in degrees). The interpretation of azimuth
- •Hardcopy and printing
- •If you specify a filename, matlab directs output to a file instead of
- •150 For figures in image formats and when
- •In portrait orientation for subsequent print operations.
- •X,y,z Dir property of axes.
Interpolated shading, which is also known as Gouraud shading, is
piecewise bilinear; the Color in each segment or patch varies linearly
and interpolates the end or corner values.
Faceted shading is flat shading with superimposed black mesh lines.
This is often the most effective and is the default.
SHADING(AX,...) uses axes AX instead of the current axes.
SHADING is a MATLAB file that sets the EdgeColor and FaceColor properties
of all SURFACE objects in the current axes. It sets them to the
correct values that depend upon whether the SURFACE objects are
representing meshes or surfaces.
See also hidden, surf, mesh, pcolor, fill, fill3, surface, patch.
Reference page in Help browser
doc shading
<hidden> - Mesh hidden line removal mode.
HIDDEN Mesh hidden line removal mode.
HIDDEN ON sets hidden line removal on for meshes in the current axes.
HIDDEN OFF sets hidden line removal off so you can see through
meshes in the current axes.
HIDDEN by itself toggles the state of hidden line removal.
See also mesh.
Reference page in Help browser
doc hidden
<brighten> - Brighten or darken color map.
BRIGHTEN Brighten or darken color map.
BRIGHTEN(BETA) replaces the current color map with a brighter
or darker map involving essentially the same colors. The map is
brighter if 0 < BETA <= 1 and darker if -1 <= BETA < 0.
BRIGHTEN(BETA), followed by BRIGHTEN(-BETA) restores the
original map.
MAP = BRIGHTEN(BETA) returns a brighter or darker version of the
color map currently being used without changing the display.
NEWMAP = BRIGHTEN(MAP,BETA) returns a brighter or darker version
of the specified color map without changing the display.
BRIGHTEN(FIG,BETA) brightens all the objects in the figure FIG.
Reference page in Help browser
doc brighten
<colordef> - Set color defaults.
COLORDEF Set color defaults.
COLORDEF WHITE or COLORDEF BLACK changes the color defaults on the
root so that subsequent figures produce plots with a white or
black axes background color. The figure background color is
changed to be a shade of gray and many other defaults are changed
so that there will be adequate contrast for most plots.
COLORDEF NONE will set the defaults to their MATLAB 4 values.
The most noticeable difference is that the axis background is set
to 'none' so that the axis background and figure background colors
are the same. The figure background color is set to black.
COLORDEF(FIG,OPTION) changes the defaults of the figure FIG
based on OPTION. OPTION can be 'white','black', or 'none'.
The figure must be cleared first (via CLF) before using this
Variant of colordef.
H = COLORDEF('new',OPTION) returns a handle to a new figure
created with the specified default OPTION. This form of the
command is handy in GUI's where you may want to control the
default environment. The figure is created with 'visible','off'
to prevent flashing.
See also whitebg.
Reference page in Help browser
doc colordef
<graymon> - Set graphics defaults for gray-scale monitors.
GRAYMON Set graphics defaults for gray-scale monitors.
GRAYMON changes the default graphics properties to produce
legible displays for gray-scale monitors.
Reference page in Help browser
doc graymon
<cmpermute> - Rearrange colors in colormap.
CMPERMUTE Rearrange colors in colormap.
[Y,NEWMAP] = CMPERMUTE(X,MAP) randomly reorders the colors in
MAP to produce a new colormap NEWMAP. CMPERMUTE also
modifies the values in X to maintain correspondence between
the indices and the colormap, and returns the result in
Y. The image Y and associated colormap NEWMAP produce the
same image as X and MAP.
[Y,NEWMAP] = CMPERMUTE(X,MAP,INDEX) uses an ordering matrix
(such as the second output of SORT) to define the order of
colors in the new colormap.
For example, to order a colormap by luminance, use:
ntsc = rgb2ntsc(map);
[dum,index] = sort(ntsc(:,1));
[Y,newmap] = cmpermute(X,map,index);
Class Support
-------------
The input image X can be of class uint8 or double. Y is
returned as an array of the same class as X.
Example
-------
This example orders a colormap by value.
load clown
hsvmap = rgb2hsv(map)
[dum,index] = sort(hsvmap(:,3));
[Y,newmap] = cmpermute(X,map,index);
figure, image(X), colormap(map)
figure, image(Y), colormap(newmap)
See also randperm, sort.
Reference page in Help browser
doc cmpermute
<cmunique> - Eliminate unneeded colors in colormap of indexed image.
CMUNIQUE Eliminate unneeded colors in colormap of indexed image.
[Y,NEWMAP] = CMUNIQUE(X,MAP) returns the indexed image Y and
associated colormap NEWMAP that produce the same image as
(X,MAP) but with the smallest possible colormap. CMUNIQUE
removes duplicate rows from the colormap and adjusts the
indices in the image matrix accordingly.
[Y,NEWMAP] = CMUNIQUE(RGB) converts the truecolor image RGB
to the indexed image Y and its associated colormap
NEWMAP. NEWMAP is the smallest possible colormap for the
image, containing one entry for each unique color in
RGB. (Note that NEWMAP may be very large, as much as P-by-3
where P is the number of pixels in RGB.)
[Y,NEWMAP] = CMUNIQUE(I) converts the intensity image I to an
indexed image Y and its associated colormap NEWMAP. NEWMAP is
the smallest possible colormap for the image, containing one
entry for each unique intensity level in I.
Class Support
-------------
The input image can be of class uint8, uint16, or double.
The class of the output image Y is uint8 if the length of
NEWMAP is less than or equal to 256. If the length of
NEWMAP is greater than 256, Y is of class double.
Example
-------
X = magic(4);
map = [gray(8); gray(8)];
[Y, newmap] = cmunique(X, map);
figure, image(X), colormap(map)
figure, image(Y), colormap(newmap)
See also rgb2ind.
Reference page in Help browser
doc cmunique
<imapprox> - Approximate indexed image by one with fewer colors.
IMAPPROX Approximate indexed image by one with fewer colors.
[Y,NEWMAP] = IMAPPROX(X,MAP,N) approximates the colors in the
indexed image X and associated colormap MAP by using minimum
variance quantization. IMAPPROX returns indexed image Y with
colormap NEWMAP, which has at most N colors.
[Y,NEWMAP] = IMAPPROX(X,MAP,TOL) approximates the colors in X
and MAP through uniform quantization. NEWMAP contains at most
(FLOOR(1/TOL)+1)^3 colors. TOL must be between 0 and 1.0.
Y = IMAPPROX(X,MAP,NEWMAP) approximates the colors in MAP by
using colormap mapping to find the colors in NEWMAP that best
match the colors in MAP.
Y = IMAPPROX(...,DITHER_OPTION) enables or disables
dithering. DITHER_OPTION is a string that can have one of
these values:
'dither' dithers, if necessary, to achieve better color
resolution at the expense of spatial
resolution (default)
'nodither' maps each color in the original image to the
closest color in the new map. No dithering is
performed.
Class Support
-------------
The input image X can be of class uint8, uint16, or double.
The output image Y is of class uint8 if the length of NEWMAP
