Plotting¶
Basic radial scan plots. Nothing is interpolated, resampled, sorted or
smoothed, and pyplot is never used. See Plotting.
plot_scans
¶
plot_scans(
experiment: AUCExperiment,
*,
ax: Axes | None = None,
scan_ids: Sequence[str] | None = None,
title: str | None = None,
legend: bool = True,
label_elapsed: bool = True,
colormap: str = DEFAULT_COLORMAP,
linewidth: float = 1.0,
marker: str | None = None,
) -> Axes
Overlay the radial scans of experiment on one set of axes.
Each scan is drawn from its own stored (radius, signal) vectors, in
stored order. Scans carrying no observations are skipped. Nothing is
interpolated, resampled, sorted or smoothed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
experiment
|
AUCExperiment
|
The experiment to draw. |
required |
ax
|
Axes | None
|
Axes to draw on. When omitted a new standalone figure is created
(reachable as |
None
|
scan_ids
|
Sequence[str] | None
|
Restrict to these scans, in the order given. Defaults to every scan, in stored order. |
None
|
title
|
str | None
|
Axes title. Defaults to the experiment identifier and name. |
None
|
legend
|
bool
|
Draw a legend when at least one scan was plotted. |
True
|
label_elapsed
|
bool
|
Append each scan's elapsed time to its legend entry when the value is present. |
True
|
colormap
|
str
|
Named matplotlib colormap used to colour scans by their order. |
DEFAULT_COLORMAP
|
linewidth
|
float
|
Line width for each scan. |
1.0
|
marker
|
str | None
|
Optional matplotlib marker for individual observations. |
None
|
Returns:
| Type | Description |
|---|---|
Axes
|
The axes drawn on. |
Raises:
| Type | Description |
|---|---|
PlottingError
|
if a requested scan identifier is absent, or if no selected scan carries any observation to draw. |
Source code in src/openauc/plotting/scans.py
plot_scan
¶
plot_scan(
experiment: AUCExperiment,
scan_id: str,
*,
ax: Axes | None = None,
title: str | None = None,
legend: bool = False,
label_elapsed: bool = True,
colormap: str = DEFAULT_COLORMAP,
linewidth: float = 1.0,
marker: str | None = None,
) -> Axes
Draw a single radial scan. See :func:plot_scans for the shared rules.