Source code for minilink.graphical.control
"""Control-analysis figures: one spec, rendered with matplotlib or plotly."""
from minilink.graphical.control import style
from minilink.graphical.control.figure_spec import (
ControlFigure,
Note,
Panel,
RefLine,
Trace,
)
__all__ = [
"ControlFigure",
"Note",
"Panel",
"RefLine",
"Trace",
"render_control_figure",
"style",
]
###############################################################################
# Public API
###############################################################################
###############################################################################
# Internal machinery
###############################################################################
def require_plot_backend(key, backend):
"""Refuse a backend other than matplotlib (or ``"mpl"``) and plotly."""
if key not in ("matplotlib", "mpl", "plotly"):
raise ValueError(
f"Unknown plot backend {backend!r}. Expected 'matplotlib' or 'plotly'."
)