heatmap¶
-
hhpy.plotting.
heatmap
(x: str, y: str, z: str, data: pandas.core.frame.DataFrame, ax: matplotlib.axes._axes.Axes = None, cmap: object = None, agg_func: str = 'mean', invert_y: bool = True, **kwargs) → matplotlib.axes._axes.Axes[source]¶ Wrapper for seaborn heatmap in x-y-z format
Parameters: - x – Variable name for x axis value
- y – Variable name for y axis value
- z – Variable name for z value, used to color the heatmap
- data – Pandas DataFrame containing named data, optional if vector data is used
- ax – The matplotlib.pyplot.Axes object to plot on, defaults to current axis [optional]
- cmap – Color map to use [optional]
- agg_func – If more than one z value per x,y pair exists agg_func is used to aggregate the data. Must be a function name understood by pandas.DataFrame.agg
- invert_y – Whether to call ax.invert_yaxis (orders the heatmap as expected)
- kwargs – Other keyword arguments passed to seaborn heatmap
Returns: The matplotlib.pyplot.Axes object with the plot on it