piel.visual.auto_plot_multiple

piel.visual.auto_plot_multiple#

Functions#

plot_simple(x_data, y_data[, label, ylabel, xlabel, ...])

Plot a simple line graph. The desire of this function is just to abstract the most basic data representation whilst

plot_simple_multi_row(data[, x_axis_column_name, ...])

Plot multiple rows of data on the same plot. Each row is a different line. Each row is a different y axis. The x

Module Contents#

plot_simple(x_data: numpy.array, y_data: numpy.array, label: str | None = None, ylabel: str | None = None, xlabel: str | None = None, fig: matplotlib.pyplot.Figure | None = None, ax: matplotlib.pyplot.Axes | None = None, *args, **kwargs)[source]#

Plot a simple line graph. The desire of this function is just to abstract the most basic data representation whilst keeping the flexibility of the matplotlib library. The goal would be as well that more complex data plots can be constructed from a set of these methods.

Parameters:
  • x_data (np.array) – X axis data.

  • y_data (np.array) – Y axis data.

  • label (str, optional) – Label for the plot. Defaults to None.

  • ylabel (str, optional) – Y axis label. Defaults to None.

  • xlabel (str, optional) – X axis label. Defaults to None.

  • fig (plt.Figure, optional) – Matplotlib figure. Defaults to None.

  • ax (plt.Axes, optional) – Matplotlib axes. Defaults to None.

Returns:

Matplotlib plot.

Return type:

plt

plot_simple_multi_row(data: pandas.DataFrame, x_axis_column_name: str = 't', row_list: list | None = None, y_axis_title_list: list | None = None, x_axis_title: str | None = None)[source]#

Plot multiple rows of data on the same plot. Each row is a different line. Each row is a different y axis. The x axis is the same for all rows. The y axis title is the same for all rows.

Parameters:
  • data (pd.DataFrame) – Data to plot.

  • x_axis_column_name (str, optional) – Column name of the x axis. Defaults to “t”.

  • row_list (list, optional) – List of column names to plot. Defaults to None.

  • y_axis_title_list (list, optional) – List of y axis titles. Defaults to None.

  • x_axis_title (str, optional) – Title of the x axis. Defaults to None.

Returns:

Matplotlib plot.

Return type:

plt