📜  matplotlib 换行标题 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:40.133000             🧑  作者: Mango

代码示例1
from textwrap import wrap
import matplotlib.pyplot as plt

x=[1,2,3]
y=[4,5,6]
plt.figure(figsize=(10,10))
plt.plot(x, y, color='red')
title='my extremely long title. I mean, really really long. Unbelievably long.'
plt.title('\n'.join(wrap(title,60)))