Skip to content

Commit 382110a

Browse files
author
sborms
committed
mini improvements
1 parent 13802c9 commit 382110a

3 files changed

Lines changed: 175 additions & 247 deletions

File tree

cobra/evaluation/plotting_utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def plot_univariate_predictor_quality(df_metric: pd.DataFrame,
4343
fig, ax = plt.subplots(figsize=dim)
4444

4545
ax = sns.barplot(x=metric, y="predictor", hue="split", data=df)
46-
ax.set_title("Univariate Quality of Predictors")
46+
ax.set_title("Univariate predictor quality", fontsize=20)
4747

4848
# Set pretty axis
4949
sns.despine(ax=ax, right=True)
@@ -59,7 +59,7 @@ def plot_univariate_predictor_quality(df_metric: pd.DataFrame,
5959
def plot_correlation_matrix(df_corr: pd.DataFrame,
6060
dim: tuple=(12, 8),
6161
path: str=None):
62-
"""Plot correlation matrix amongst the predictors.
62+
"""Plot correlation matrix of the predictors.
6363
6464
Parameters
6565
----------
@@ -72,7 +72,7 @@ def plot_correlation_matrix(df_corr: pd.DataFrame,
7272
"""
7373
fig, ax = plt.subplots(figsize=dim)
7474
ax = sns.heatmap(df_corr, cmap='Blues')
75-
ax.set_title('Correlation Matrix')
75+
ax.set_title("Correlation matrix", fontsize=20)
7676

7777
if path is not None:
7878
plt.savefig(path, format="png", dpi=300, bbox_inches="tight")
@@ -166,7 +166,7 @@ def plot_variable_importance(df_variable_importance: pd.DataFrame,
166166
Parameters
167167
----------
168168
df_variable_importance : pd.DataFrame
169-
DataFrame containing columns predictor and importance.
169+
DataFrame containing columns "predictor" and "importance".
170170
title : str, optional
171171
Title of the plot.
172172
dim : tuple, optional
@@ -180,9 +180,9 @@ def plot_variable_importance(df_variable_importance: pd.DataFrame,
180180
data=df_variable_importance,
181181
color="cornflowerblue")
182182
if title:
183-
ax.set_title(title)
183+
ax.set_title(title, fontsize=20)
184184
else:
185-
ax.set_title("Variable importance")
185+
ax.set_title("Variable importance", fontsize=20)
186186

187187
# Set Axis - make them pretty
188188
sns.despine(ax=ax, right=True)

0 commit comments

Comments
 (0)