File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77
88[project ]
99name = " spotpython"
10- version = " 0.15.6 "
10+ version = " 0.15.7 "
1111authors = [
1212 { name =" T. Bartz-Beielstein" , email =" tbb@bartzundbartz.de" }
1313]
Original file line number Diff line number Diff line change 11from sklearn .model_selection import cross_val_predict
22import matplotlib .pyplot as plt
3+ import matplotlib
34from sklearn .base import BaseEstimator
45from sklearn .metrics import PredictionErrorDisplay
56from sklearn .metrics import RocCurveDisplay
@@ -130,6 +131,7 @@ def plot_roc_from_dataframes(
130131 target_column : str = None ,
131132 show : bool = True ,
132133 title : str = "" ,
134+ tkagg : bool = False ,
133135) -> None :
134136 """
135137 Plot ROC curve for a list of dataframes from model evaluations.
@@ -147,6 +149,9 @@ def plot_roc_from_dataframes(
147149 If True, the plot is shown.
148150 title:
149151 Title of the plot.
152+ tkagg:
153+ If True, the TkAgg backend is used.
154+ Default is False.
150155
151156 Returns:
152157 None
@@ -161,6 +166,8 @@ def plot_roc_from_dataframes(
161166 plot_roc_from_dataframes(df_list, model_names=model_names, target_column="y")
162167
163168 """
169+ if tkagg :
170+ matplotlib .use ("TkAgg" )
164171 fig , ax = plt .subplots (figsize = (10 , 5 ))
165172 for i , df in enumerate (df_list ):
166173 y_test = df [target_column ]
You can’t perform that action at this time.
0 commit comments