python label和title使用变量格式化输出 a=['aa','b','v'] plt.scatter(xlabel,ylabel) plt.title('{}'.format(a[2])) plt.xlabel('%s'%a[0]) plt.ylabel('Y/N') 数组中存储这各个特征的名称,画图的时候需要自动根据变量来实现坐标和标题的设置,使用格式化输出