plottools

plot_tools

create_signal_plot_matplotlib(ax, signal=None, x_values=None, show_peaks=False, peaks=None, plot_title='Signal Plot', signal_name='Signal', x_label='Sample')[source]

Generates plots for given signals using Matplotlib.

Parameters:
  • ax (plt.Axes) – Axes to plot signal.

  • signal (ArrayLike, optional) – Array of y-axis values. Defaults to None.

  • x_values (_type_, optional) – Array of x-axis values. Defaults to None.

  • show_peaks (bool, optional) – If True, peaks are plotted. Defaults to False.

  • peaks (dict, optional) – Dictionary of peaks to be plotted. Defaults to None.

  • plot_title (str, optional) – Plot title. Defaults to “Signal Plot”.

  • signal_name (str, optional) – Name of signal to be plotted. Defaults to “Signal”.

  • x_label (str, optional) – Label of x-axis. Defaults to ‘Sample’.

create_signal_plot_plotly(fig, signal=None, x_values=None, show_peaks=False, peaks=None, plot_title='Signal Plot', signal_name='Signal', x_label='Sample', width=1050, height=600, location=None)[source]

Generates plots for given signals using Plotly.

Parameters:
  • fig (go.Figure) – Figure to plot signal.

  • signal (ArrayLike, optional) – Array of y-axis values. Defaults to None.

  • x_values (ArrayLike, optional) – Array of x-axis values. Defaults to None.

  • show_peaks (bool, optional) – If True, peaks are plotted. Defaults to False.

  • peaks (dict, optional) – Dictionary of peaks to be plotted. Defaults to None.

  • plot_title (str, optional) – Plot title. Defaults to “Signal Plot”.

  • signal_name (str, optional) – Name of signal to be plotted. Defaults to “Signal”.

  • x_label (str, optional) – Label of x-axis. Defaults to ‘Sample’.

  • width (float, optional) – Figure width. Defaults to 1050.

  • height (float, optional) – Figure height. Defaults to 600.

  • location (tuple, optional) – Subplot location. Defaults to None.

Raises:

ValueError – If location is not provided.