mcstasscript.jb_interface.plot_interface.ColormapDropdown

mcstasscript.jb_interface.plot_interface.ColormapDropdown

class mcstasscript.jb_interface.plot_interface.ColormapDropdown(set_colormap)

Class for controlling dropdown menus for colormaps

__init__(set_colormap)

Controls colormap dropdown menus with given set_colormap function

Creates dropdown widget and calls the given set_colormap function when the user updates the colormap choice. The colormap choice is given as two dropdown menus, one for selecting the category of colormap, and the other to select the actual colormap.

The available colormaps are those supported in matplotlib

Parameters

set_colormap (function) – Function called with colormap name as argument when changed

Methods

__init__(set_colormap)

Controls colormap dropdown menus with given set_colormap function

make_widget()

Creates the widget and sets appropriate update functions

update_cmap(change)

Updates the colormap with the set_colormap function in attributes

update_cmap_options(change)

Updates the colormap options in the colormap widget

make_widget()

Creates the widget and sets appropriate update functions

The category dropdown will change options for the actual colormap dropdown menu through the update_cmap_options method. The colormap choice uses the update_cmap method and calls the update_function held in attributes.

update_cmap(change)

Updates the colormap with the set_colormap function in attributes

update_cmap_options(change)

Updates the colormap options in the colormap widget