seaborn.FacetGrid.map_dataframe#
- FacetGrid.map_dataframe(func, *args, **kwargs)#
Like
.mapbut 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
datakeyword 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
mapmethod, a function used here must “understand” Pandas objects. It also must plot to the currently active matplotlib Axes and take acolorkeyword argument. If faceting on thehuedimension, it must also take alabelkeyword argument.- argsstrings
Column names in self.data that identify variables with data to plot. The data for each variable is passed to
funcin the order the variables are specified in the call.- kwargskeyword arguments
All keyword arguments are passed to the plotting function.
- Returns:
- selfobject
Returns self.