Syntax issue with plt.title(r'title')
So I have a line of code to set a plot title:
But what I really want to do is replace 'title' with a variable string. I try but it won't run because of that r character. How is the syntax suppose to be?
Here is what I have tried:
plt.title(r self.tf.text) #bad
You don't need the
rat all, that's just for raw string literals, which are typically used for regular expressions. Just use something like