qcodespp.plotting.offline.helpers
Attributes
Classes
Functions
Module Contents
- qcodespp.plotting.offline.helpers.cmaps
- class qcodespp.plotting.offline.helpers.MidpointNormalize(vmin=None, vmax=None, midpoint=None, clip=False)
Bases:
matplotlib.colors.NormalizeA class which, when called, maps values within the interval
[vmin, vmax]linearly to the interval[0.0, 1.0]. The mapping of values outside[vmin, vmax]depends on clip.Examples
x = [-2, -1, 0, 1, 2] norm = mpl.colors.Normalize(vmin=-1, vmax=1, clip=False) norm(x) # [-0.5, 0., 0.5, 1., 1.5] norm = mpl.colors.Normalize(vmin=-1, vmax=1, clip=True) norm(x) # [0., 0., 0.5, 1., 1.]
See Also
colormapnorms
- midpoint = None
- __call__(value, clip=None)
Normalize the data and return the normalized data.
Parameters
- value
Data to normalize.
- clipbool, optional
See the description of the parameter clip in .Normalize.
If
None, defaults toself.clip(which defaults toFalse).
Notes
If not already initialized,
self.vminandself.vmaxare initialized usingself.autoscale_None(value).
Bases:
matplotlib.backends.backend_qt5.NavigationToolbar2QTBase class for the navigation cursor, version 2.
Backends must implement a canvas that handles connections for ‘button_press_event’ and ‘button_release_event’. See
FigureCanvasBase.mpl_connect()for more information.They must also define
save_figure()Save the current figure.
draw_rubberband()(optional)Draw the zoom to rect “rubberband” rectangle.
set_message()(optional)Display message.
set_history_buttons()(optional)You can change the history back / forward buttons to indicate disabled / enabled state.
and override
__init__to set up the toolbar – without forgetting to call the base-class init. Typically,__init__needs to set up toolbar buttons connected to the home, back, forward, pan, zoom, and save_figure methods and using standard icons in the “images” subdirectory of the data path.That’s it, we’ll do the rest!
- qcodespp.plotting.offline.helpers.DARK_COLOR = '#19232D'
- qcodespp.plotting.offline.helpers.GREY_COLOR = '#505F69'
- qcodespp.plotting.offline.helpers.LIGHT_COLOR = '#F0F0F0'
- qcodespp.plotting.offline.helpers.rcParams_to_dark_theme()
- qcodespp.plotting.offline.helpers.rcParams_to_light_theme()