Brighten or darken a colormap.
The argument beta must be a scalar between -1 and 1, where a negative value darkens and a positive value brightens the colormap.
If the map argument is omitted, the function is applied to the current colormap.
The first argument can also be a valid graphics handle h, in which
case brighten
is applied to the colormap associated with this handle.
If no output is specified then the result is written to the current colormap.
See also: colormap, contrast.
The following code
## First figure uses default grayscale colormap clf; colormap (gray (64)); image (1:64, linspace (0, 1, 64), repmat ((1:64)', 1, 64)); axis ([1, 64, 0, 1], "xy"); set (gca, "xtick", []); title ("default grayscale colormap"); pos = get (gcf, "position"); pos(1) += pos(3) + 25; ## Second figure uses brightened grayscale colormap figure ("position", pos); colormap (gray (64)); image (1:64, linspace (0, 1, 64), repmat ((1:64)', 1, 64)); axis ([1, 64, 0, 1], "xy"); set (gca, "xtick", []); brighten (0.5); title ("grayscale colormap brightened by 0.5");
Produces the following figures
Figure 1 | Figure 2 |
---|---|
Package: octave