I am currently using the annotate() method for my data points and I was curious if there is a way to center a line of text relative to a line of text below it. I am currently using two annotate() function calls in a row (I need the text to be different colors) but I need the first one to act as a title for the second (i.e. so I want it centered relative to the one below.) I have tried to use the length of the second bit of text to center but I just cannot seem to do it. The code looks sort of like this:
I am currently using the annotate() method for my data points and I was curious if there is a way to center a line of text relative to a line of text below it. I am currently using two annotate() function calls in a row (I need the text to be different colors) but I need the first one to act as a title for the second (i.e. so I want it centered relative to the one below.) I have tried to use the length of the second bit of text to center but I just cannot seem to do it. The code looks sort of like this: