diff --git a/plotsandgraphs/binary_classifier.py b/plotsandgraphs/binary_classifier.py index 70e5069..e6fd62f 100644 --- a/plotsandgraphs/binary_classifier.py +++ b/plotsandgraphs/binary_classifier.py @@ -137,7 +137,7 @@ def plot_classification_report(y_test: np.ndarray, bounds = np.linspace(0, 1, 11) cmap = plt.cm.get_cmap('YlOrRd', len(bounds)+1) - norm = colors.BoundaryNorm(bounds, cmap.N) + norm = colors.BoundaryNorm(bounds, cmap.N) # type: ignore[attr-defined] ax = sns.heatmap(df, mask=mask, annot=False, cmap=cmap, fmt='.3g', cbar_kws={'ticks':bounds[::2], 'norm':norm, 'boundaries':bounds}, diff --git a/plotsandgraphs/compare_distributions.py b/plotsandgraphs/compare_distributions.py index 943c3e0..c9cbda2 100644 --- a/plotsandgraphs/compare_distributions.py +++ b/plotsandgraphs/compare_distributions.py @@ -2,17 +2,17 @@ import matplotlib.pyplot as plt import matplotlib as mpl import pandas as pd -from typing import List, Tuple +from typing import List, Tuple, Optional def plot_raincloud(df: pd.DataFrame, x_col: str, y_col: str, - colors: List[str] = None, - order: List[str] = None, - title: str = None, - x_label: str = None, - x_range: Tuple[float, float] = None, + colors: Optional[List[str]] = None, + order: Optional[List[str]] = None, + title: Optional[str] = None, + x_label: Optional[str] = None, + x_range: Optional[Tuple[float, float]] = None, show_violin = True, show_scatter = True, show_boxplot = True):