plot_xy#
- caf.viz.xy_plot.plot_xy(data, x_column, y_column, type_=XYPlotType.SCATTER, *, title=None, weight_column=None)[source]#
Create a graph of data based on given columns.
Multiple subplots may be produced on the same figure if multiple values are given for the columns.
- Parameters:
data (pd.DataFrame) – Data to be plotted.
x_column (str | Sequence[str]) – Name(s) of columns containing x (or y) values. If multiple are given the figure will contain different subplots for each.
y_column (str | Sequence[str]) – Name(s) of columns containing x (or y) values. If multiple are given the figure will contain different subplots for each.
type (XYPlotType, default XYPlotType.SCATTER) – Type of plot to add to axes.
title (str, optional) – Title to add to figure.
weight_column (str | Sequence[str], optional) – Column(s) containing data for creating colormaps on the plots.
type_ (XYPlotType)
- Returns:
Figure with plots.
- Return type:
figure.Figure
- Raises:
ValueError – If x_column and y_column are sequences of different lengths. If weight_column doesn’t contain the same number of columns as x_column.