mjolnir.plotting.plot_nd#
- mjolnir.plotting.plot_nd(dataset_or_run_id, array_target=None, vertical_target=None, horizontal_target=None, plot_leakage=None, plot_power=None, plot_slice=True, autoscale=True, xscale=None, yscale=None, slider_scale=None, norm=None, valfmt='.3g', pad_subplots=True, fast=None, style=None, fig_kw=None, **kwargs)[source]#
Plots QCoDeS measurements with >= 2 sweep axes.
Plots are color plots of 2d slices through the nd data. Extra dimensions get a slider which can be moved to select slices along that coordinate.
- Parameters:
dataset_or_run_id (Dataset | DataSetProtocol | int) –
- One of
a qcodes dataset
the run ID of the measurement in the currently open database
a xarray dataset
array_target (str | None) – (Part of) the parameter name to be plotted in the main plot.
vertical_target (str | None) – (Part of) the parameter name to be plotted on the vertical axis.
horizontal_target (str | None) – (Part of) the parameter name to be plotted on the horizontal axis.
plot_leakage (bool | None) – Plot leakage values of gates swept on the vertical axis, if any, in a subplot.
plot_power (bool | None) – Plot laser power readings during parameters sweeps on the vertical axis, if any, in a subplot.
plot_slice (bool) – Plot a horizontal 1d-slice through the image data in a subplot.
autoscale (bool | Mapping[Literal['leakage', 'power', 'array', 'slice'], bool]) – Autoscale axes/colormaps when moving sliders. If True, autoscale is applied to all axes and colormaps. If dict, should have any of the keys {‘leakage’, ‘power’, ‘array’, ‘slice’} with a boolean value.
xscale (str | None) – The scale of the x-axis.
yscale (str | None) – The scale of the y-axis.
slider_scale (Mapping[str, str] | None) – The scale of a given slider. Should be a mapping with keys corresponding to (part of) the parameter name on the slider.
norm (Normalize | None) – The
Normalizeinstance to normalize array data to the colormap.valfmt (str | Mapping[str, str]) – A format string to be used for slider labels.
pad_subplots (bool) – Add white space between subplots or have them tightly against each other.
fast (bool | None) – Use a fast plot style.
style (str | dict[str, Any] | Path | list[str | dict[str, Any] | Path] | None) – A valid matplotlib plotting style.
fig_kw (Mapping[str, Any] | None) – Kwargs passed on to the
figure()constructor.**kwargs – Kwargs passed on to the
xarray.DataArray.plot()method.