Shun7_natural
Shun7_natural

Reputation: 133

AttributeError: 'numpy.float64' object has no attribute 'pop' in plt.title func of matplotlib

I want put a caculated value in title, and it can work

plt.title(sum_auc)

However,if I add "AUC:", it didn't work

plt.title("AUC:",sum_auc)

and show no attribute 'pop'

Upvotes: 0

Views: 1821

Answers (1)

Renaud
Renaud

Reputation: 2819

Try to cast sum_auc as str

plt.title(f"AUC:{sum_auc}") 

Or

plt.title("AUC:"+str(sum_auc)) 

Upvotes: 1

Related Questions