标签: python matplotlib
是否可以在pylab中的标题/图例标签内创建多行文本?
答案 0 :(得分:13)
是的,只需在其中使用\ n转义序列。
element = pylab.plot(range(100)) pylab.legend([element],[ "first line \n second line"])