FacetGrid.map_dataframe(func, *args, **kwargs)

Like .map but passes args as strings and inserts data in kwargs.

This method is suitable for plotting with functions that accept a long-form DataFrame as a data keyword argument and access the data in that DataFrame using string variable names.


func : callable

A plotting function that takes data and keyword arguments. Unlike the map method, a function used here must “understand” Pandas objects. It also must plot to the currently active matplotlib Axes and take a color keyword argument. If faceting on the hue dimension, it must also take a label keyword argument.

args : strings

Column names in that identify variables with data to plot. The data for each variable is passed to func in the order the variables are specified in the call.

kwargs : keyword arguments

All keyword arguments are passed to the plotting function.


self : object

Returns self.