Python matplotlib.cm.spectral() Examples

The following are 3 code examples of matplotlib.cm.spectral(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module matplotlib.cm , or try the search function .
Example #1
Source File: pyplot.py    From Computable with MIT License 5 votes vote down vote up
def spectral():
    '''
    set the default colormap to spectral and apply to current image if any.
    See help(colormaps) for more information
    '''
    rc('image', cmap='spectral')
    im = gci()

    if im is not None:
        im.set_cmap(cm.spectral)
    draw_if_interactive() 
Example #2
Source File: pyplot.py    From matplotlib-4-abaqus with MIT License 5 votes vote down vote up
def spectral():
    '''
    set the default colormap to spectral and apply to current image if any.
    See help(colormaps) for more information
    '''
    rc('image', cmap='spectral')
    im = gci()

    if im is not None:
        im.set_cmap(cm.spectral)
    draw_if_interactive() 
Example #3
Source File: pyplot.py    From neural-network-animation with MIT License 5 votes vote down vote up
def spectral():
    '''
    set the default colormap to spectral and apply to current image if any.
    See help(colormaps) for more information
    '''
    rc('image', cmap='spectral')
    im = gci()

    if im is not None:
        im.set_cmap(cm.spectral)
    draw_if_interactive()