Main Content

spinmap

(To be removed) Rotate colormap colors

spinmap will be removed in a future release.

Description

spinmap rotates the current colormap by two rows repeatedly for approximately three seconds.

spinmap(t) rotates the current colormap by two rows repeatedly for t seconds.

example

spinmap(t,n) rotates the current colormap by n rows for t seconds.

Examples

collapse all

Create a surface plot that uses the default colormap. Then rotate the colormap by one row for five seconds.

surf(peaks);
colorbar
spinmap(5,1)

Figure contains an axes object. The axes object contains an object of type surface.

Input Arguments

collapse all

Rotation duration, specified as a scalar numeric value or 'inf'. A numeric value specifies the number of seconds to rotate the colormap. A value of 'inf' makes the colormap rotate indefinitely.

Rotation amount, specified as a numeric scalar value. The first rotation shifts each color in the colormap by n rows. Subsequent rotations shift the colormap by an additional n rows.

Positive values increment the rows, where the last color wraps to the first row. A negative value decrements the rows, where the first color wraps to the last row.

Tips

Press Ctrl+C to interrupt the rotation before t has elapsed.

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

spinmap will be removed in a future release. There is no replacement for this function.