0

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'

0

1 Answer 1

1

Try to cast sum_auc as str

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

Or

plt.title("AUC:"+str(sum_auc)) 
Sign up to request clarification or add additional context in comments.

3 Comments

it can work plt.title(sum_auc), even though didn't add str func. I mean why it didn't work when add "AUC:"
So try plt.title(f"AUC:{sum_auc}")
Or plt.title("AUC:"+str(sum_auc))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.