ColormapMode

class glue.viewers.common.qt.mouse_mode.ColormapMode(viewer=None)[source]

Bases: glue.viewers.common.qt.tool.Tool

A tool to change the colormap used in a viewer.

This calls a set_cmap method on the viewer, which should take the name of the colormap as the sole argument.

Attributes Summary

action_text
enabled A property that callback functions can be added to.
icon
shortcut
status_tip
tool_id
tool_tip

Methods Summary

activate() Fired when the toolbar button is activated
close()
menu_actions()

Attributes Documentation

action_text = 'Set color scale'
enabled

A property that callback functions can be added to.

When a callback property changes value, each callback function is called with information about the state change. Otherwise, callback properties behave just like normal instance variables.

CallbackProperties must be defined at the class level. Use the helper function add_callback() to attach a callback to a specific instance of a class with CallbackProperties

Parameters:

default

The initial value for the property

docstring : str

The docstring for the property

getter, setter : func

Custom getter and setter functions (advanced)

icon = 'glue_rainbow'
shortcut = None
status_tip = None
tool_id = 'image:colormap'
tool_tip = 'Set color scale'

Methods Documentation

activate()

Fired when the toolbar button is activated

close()
menu_actions()[source]