patched

External functions patched or extended for outset compatibility.

Functions

annotateplot(data, *, x, y, text[, ax, ...])

Annotate a plot coordinates with text labels, then apply adjustText to rearrange the labels to avoid overlaps.

regplot(data, *, x, y[, hue, hue_order, ax])

Plot regressions with seaborn's regplot on a pandas DataFrame.

scatterplot(data, *args, **kwargs)

Wrapper around sns.scatterplot patching seaborn issue #3601.

annotateplot(data: DataFrame, *, x: str, y: str, text: str, ax: Axes | None = None, adjusttext_kws: Mapping = frozendict.frozendict({}), **kwargs: dict) Axes[source]

Annotate a plot coordinates with text labels, then apply adjustText to rearrange the labels to avoid overlaps.

Parameters:
  • data (pd.DataFrame) – The DataFrame containing the data to plot.

  • x (str) – The name of the column in data to use for the x-axis values.

  • y (str) – The name of the column in data to use for the y-axis values.

  • text (Optional[str], default None) – The name of the column in data to use for text values.

  • ax (Optional[plt.Axes], default None) – The matplotlib Axes object to draw the plot onto, if provided.

  • adjusttext_kws (Mapping, default {}) – Additional keyword arguments forward to adjustText.

  • **kwargs (dict) – Additional keyword arguments forward to seaborn’s regplot.

Returns:

The matplotlib Axes containing the plot.

Return type:

plt.Axes

Notes

This functionality is not provided by seaborn.

regplot(data: DataFrame, *, x: str, y: str, hue: str | None = None, hue_order: Any | None = None, ax: Axes | None = None, **kwargs: dict) Axes[source]

Plot regressions with seaborn’s regplot on a pandas DataFrame.

Parameters:
  • data (pd.DataFrame) – The DataFrame containing the data to plot.

  • x (str) – The name of the column in data to use for the x-axis values.

  • y (str) – The name of the column in data to use for the y-axis values.

  • hue (Optional[str], default None) – The name of the column in data to use for color encoding.

  • hue_order (Optional[Any], default None) – The order to plot the hue levels, if hue is not None.

  • ax (Optional[plt.Axes], default None) – The matplotlib Axes object to draw the plot onto, if provided.

  • **kwargs (dict) – Additional keyword arguments forward to seaborn’s regplot.

Returns:

The matplotlib Axes containing the plot.

Return type:

plt.Axes

Notes

This function extends seaborn’s regplot functionality by adding support for hue-based grouping and customizing plot aesthetics.

scatterplot(data: DataFrame, *args: list, **kwargs: dict) Axes[source]

Wrapper around sns.scatterplot patching seaborn issue #3601.

See https://github.com/mwaskom/seaborn/issues/3601.