Plot
build_title(title, path, params)
Build a plot title that includes the values of given parameters found in the params_dict.json file, e.g. One tone with I = 0.5 mA.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
title
|
str
|
Title of the plot to which the parameters will be appended. |
required |
path
|
str
|
Path to the param_dict.json file. |
required |
params
|
List[str]
|
List of keys of parameters in the param_dict.json file. |
required |
Returns:
Type | Description |
---|---|
str
|
The original title followed by parameter values. |
Source code in sqil_core/utils/_plot.py
get_x_id_by_plot_dim(exp_id, plot_dim, sweep_param_id)
Returns the param_id of the parameter that should be used as the x-axis.
Source code in sqil_core/utils/_plot.py
guess_plot_dimension(f, sweep=[], threshold_2D=10)
Guess if the plot should be a 1D line, a collection of 1D lines (1.5D), or a 2D color plot.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
f
|
ndarray
|
Main variable, usually frequency |
required |
sweep
|
Union[ndarray, List]
|
Sweep variable, by default [] |
[]
|
threshold_2D
|
int
|
Threshold of sweeping parameters after which the data is considered, by default 10 |
10
|
Returns:
Type | Description |
---|---|
Tuple[Union[1, 1.5, 2], ndarray]
|
The plot dimension ('1', '1.5' or '2') and the vector that should be used as the x axis in the plot. |
Source code in sqil_core/utils/_plot.py
reset_plot_style(plt)
set_plot_style(plt)
Sets the matplotlib plotting style to a SQIL curated one.