continuous_timeseries.plotting_helpers#
Support for plotting
Functions:
| Name | Description |
|---|---|
get_plot_vals |
Get values to plot |
get_plot_vals #
get_plot_vals(
pint_q: PINT_NUMPY_ARRAY,
desc: str,
warn_if_magnitudes: bool,
) -> PINT_NUMPY_ARRAY | NDArray[number[Any]]
Get values to plot
This function is a helper that ensures that we use pint objects when matplotlib knows about them but plain numpy arrays otherwise.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pint_q
|
PINT_NUMPY_ARRAY
|
Pint quantity from which to get the plot values. |
required |
desc
|
str
|
Descripion of |
required |
warn_if_magnitudes
|
bool
|
Should a warning be raised if magnitudes will be returned? This helps alert users that they haven't set matplotlib up to be unit-aware with pint. |
required |
Returns:
| Type | Description |
|---|---|
PINT_NUMPY_ARRAY | NDArray[number[Any]]
|
Values to plot |
Warns:
| Type | Description |
|---|---|
UserWarning
|
Magnitudes will be returned and Also warns if |