corrplot_bar¶
-
hhpy.plotting.
corrplot_bar
(data: pandas.core.frame.DataFrame, target: str = None, columns: List[str] = None, corr_cutoff: float = 0, corr_as_alpha: bool = False, xlim: tuple = (-1, 1), ax: matplotlib.axes._axes.Axes = None)[source]¶ Correlation plot as barchart based on
get_df_corr()
Parameters: - data – Pandas DataFrame containing named data, optional if vector data is used
- target – Target variable name, if specified only correlations with the target are shown [optional]
- columns – Columns for which to calculate the correlations, defaults to all numeric columns [optional]
- corr_cutoff – Filter all correlation whose absolute value is below the cutoff [optional]
- corr_as_alpha – Whether to set alpha value of bars to scale with correlation [optional]
- xlim – xlim scale for plot, defaults to (-1, 1) to show the absolute scale of the correlations. set to None if you want the plot x limits to scale to the highest correlation values [optional]
- ax – The matplotlib.pyplot.Axes object to plot on, defaults to current axis [optional]
Returns: The matplotlib.pyplot.Axes object with the plot on it