5. Colorbar

_images/colorbar_ico.png

Colorbar is a GUI based module for colorbar control.

from visbrain import Colorbar

Visit this page for a set of examples.

_images/ex_open_editor1.png

5.1. API

5.1.1. Main class

class visbrain.Colorbar(config=None, **kwargs)[source][source]

Display a colorbar editor.

Parameters:

config : string | None

Path to a configuration file.

cmap : string | inferno

Matplotlib colormap

clim : tuple/list | None

Limit of the colormap. The clim parameter must be a tuple / list of two float number each one describing respectively the (min, max) of the colormap. Every values under clim[0] or over clim[1] will peaked.

vmin : float | None

Threshold from which every color will have the color defined using the under parameter bellow.

under : tuple/string | ‘gray’

Matplotlib color for values under vmin.

vmax : float | None

Threshold from which every color will have the color defined using the over parameter bellow.

over : tuple/string | ‘red’

Matplotlib color for values over vmax.

cblabel : string | ‘’

Colorbar label.

cbtxtsz : float | 26.

Text size of the colorbar label.

cbtxtsh : float | 2.3

Shift for the colorbar label.

txtcolor : string | ‘white’

Text color.

txtsz : float | 20.

Text size for clim/vmin/vmax text.

txtsh : float | 1.2

Shift for clim/vmin/vmax text.

border : bool | True

Display colorbar borders.

limtxt : bool | True

Display vmin/vmax text.

bgcolor : tuple/string | (.1, .1, .1)

Background color of the colorbar canvas.

ndigits : int | 2

Number of digits for the text.