seaborn.FacetGrid.map_dataframe#
- 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.- Parameters:
- funccallable
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 acolor
keyword argument. If faceting on thehue
dimension, it must also take alabel
keyword argument.- argsstrings
Column names in self.data 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.- kwargskeyword arguments
All keyword arguments are passed to the plotting function.
- Returns:
- selfobject
Returns self.