Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

spinmap

Rotate colormap colors

Syntax

spinmap
spinmap(t)
spinmap(t,n)

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)

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.

Introduced before R2006a

Was this topic helpful?