weldx_widgets/widget_measurement.py
def plot_signal(signal: weldx.measurement.Signal, name, limits=None, ax=None):
    """Plot a single weldx signal."""
    if not ax:
        fig, ax = plt.subplots(figsize=(_DEFAULT_FIGWIDTH, 6))

    data = signal.data
    time = weldx.Time(data.time).as_quantity()

    ax.plot(time.m, data.data.m)
    ax.set_ylabel(f"{name} / {ureg.Unit(signal.units):~}")
    ax.set_xlabel(_("time") + " / s")
    ax.grid()

    if limits is not None:
        ax.set_xlim(limits)

    ipympl_style(ax.figure)
Plot a single weldx signal.
Plot a single weldx signal.
Plot a single weldx signal .
def plot_signal(signal: weldx.measurement.Signal, name, limits=None, ax=None):
    if not ax:
        fig, ax = plt.subplots(figsize=(_DEFAULT_FIGWIDTH, 6))
    data = signal.data
    time = weldx.Time(data.time).as_quantity()
    ax.plot(time.m, data.data.m)
    ax.set_ylabel(f"{name} / {ureg.Unit(signal.units):~}")
    ax.set_xlabel(_("time") + " / s")
    ax.grid()
    if limits is not None:
        ax.set_xlim(limits)
    ipympl_style(ax.figure)
def plot_signal ( signal : weldx . measurement . Signal , name , limits = None , ax = None ) : if not ax : fig , ax = plt . subplots ( figsize = ( _DEFAULT_FIGWIDTH , 6 ) ) data = signal . data time = weldx . Time ( data . time ) . as_quantity ( ) ax . plot ( time . m , data . data . m ) ax . set_ylabel ( f"{name} / {ureg.Unit(signal.units):~}" ) ax . set_xlabel ( _ ( "time" ) + " / s" ) ax . grid ( ) if limits is not None : ax . set_xlim ( limits ) ipympl_style ( ax . figure )
Plot a single weldx signal.
Plot a single weldx signal .
"""Plot a single weldx signal."""
signal
weldx.measurement.Signal
name
limits
ax