PyLab title / legend tags with multiple lines of text

Is it possible to make multiple lines of text inside the header / legend label in pylab?

+7
source share
1 answer

Yes, just use the escape sequence \ n inside.

element = pylab.plot(range(100)) pylab.legend([element],[ "first line \n second line"]) 
+11
source

All Articles