depictr.scatter_trend#
- depictr.scatter_trend(data, x, y, group=None, method='lm', title=None)#
Scatter plot with a fitted trend line and confidence band.
- Parameters:
data (pandas.DataFrame) – The data.
x (str) – Names of the numeric columns for the horizontal and vertical axes.
y (str) – Names of the numeric columns for the horizontal and vertical axes.
group (str, optional) – A grouping column. When given, points and a separate trend line are coloured by group via
depictr.theme.scale_colour_depictr().method (str) – Smoothing method passed to
plotnine.geom_smooth(), for example"lm"for a straight line or"lowess"for a local fit.title (str, optional) – Plot title.
- Return type:
plotnine.ggplot