chemparseplot.plot.structs#
Module Contents#
Classes#
Protocol for the result of converting a unit-aware series. |
|
Protocol for pint-like data accepted by plotting helpers. |
|
Canonical axis-unit mapping for 2D plot helpers. |
|
Typed energy path with unit-aware distance and energy series. |
|
Typed generic XY data with unit-aware axes. |
|
Typed structure placement for strips and inset-aligned labels. |
|
Thin wrapper around a matplotlib figure and axes with defaults. |
|
Interactive 2D plotter with unit-aware axes and spline interpolation. |
Functions#
Convert a unit-aware series to magnitudes in the requested unit. |
|
Format a consistent axis label with units. |
|
Convert energy-like values between supported presentation units. |
|
Convert eigenvalue-like values while preserving the Angstrom denominator. |
|
Format a canonical energy-axis label. |
|
Format a canonical curvature-axis label. |
Data#
API#
- chemparseplot.plot.structs._ENERGY_FACTORS#
None
- class chemparseplot.plot.structs.UnitConverted#
Bases:
typing.ProtocolProtocol for the result of converting a unit-aware series.
- class chemparseplot.plot.structs.UnitSeries#
Bases:
typing.ProtocolProtocol for pint-like data accepted by plotting helpers.
- to(unit: str) chemparseplot.plot.structs.UnitConverted#
- class chemparseplot.plot.structs.AxisUnits#
Bases:
typing.TypedDictCanonical axis-unit mapping for 2D plot helpers.
Initialization
Initialize self. See help(type(self)) for accurate signature.
- chemparseplot.plot.structs.to_magnitude(values: chemparseplot.plot.structs.UnitSeries, unit: str) Any#
Convert a unit-aware series to magnitudes in the requested unit.
- chemparseplot.plot.structs.axis_label(label: str, unit: str) str#
Format a consistent axis label with units.
- chemparseplot.plot.structs.convert_energy(values: Any, unit: str, *, source_unit: str = 'eV') numpy.ndarray#
Convert energy-like values between supported presentation units.
Delegates to :func:
chemparseplot.units.convert_energy_magnitude(pint-backed). Accepts plain arrays or pintQuantityinstances (converted via.to).
- chemparseplot.plot.structs.convert_energy_curvature(values: Any, unit: str, *, source_unit: str = 'eV') numpy.ndarray#
Convert eigenvalue-like values while preserving the Angstrom denominator.
- chemparseplot.plot.structs.energy_axis_label(unit: str, *, label: str = 'Energy') str#
Format a canonical energy-axis label.
- chemparseplot.plot.structs.eigenvalue_axis_label(unit: str, *, label: str = 'Eigenvalue') str#
Format a canonical curvature-axis label.
- class chemparseplot.plot.structs.EnergyPath#
Typed energy path with unit-aware distance and energy series.
Added in version 0.0.3.
- distance: chemparseplot.plot.structs.UnitSeries#
None
- energy: chemparseplot.plot.structs.UnitSeries#
None
- class chemparseplot.plot.structs.XYData#
Typed generic XY data with unit-aware axes.
Added in version 0.0.3.
- class chemparseplot.plot.structs.StructurePlacement#
Typed structure placement for strips and inset-aligned labels.
- class chemparseplot.plot.structs.BasePlotter(figsize=(3.2, 2.5), dpi=200, pad=0.2, colormap=None, style='bmh')#
Thin wrapper around a matplotlib figure and axes with defaults.
Added in version 0.0.3.
Initialization
- add_title(title='')#
- class chemparseplot.plot.structs.TwoDimPlot(*args, **kwargs)#
Bases:
chemparseplot.plot.structs.BasePlotterInteractive 2D plotter with unit-aware axes and spline interpolation.
Added in version 0.0.3.
Initialization
- set_labels(x_label, y_label)#
- set_units(x_unit, y_unit)#
- update_labels()#
- redraw_plot()#
- add_data(xy_data: chemparseplot.plot.structs.XYData)#
- rmdat(labels_to_remove)#
- __repr__()#