Python:在Pylab标题中使用变量
我有变量N和W,它们随着每次运行而变化。是否可以执行以下操作Python:在Pylab标题中使用变量,python,matplotlib,Python,Matplotlib,我有变量N和W,它们随着每次运行而变化。是否可以执行以下操作 pylab.title('Minimal Energy Configuration of' N 'Charges on Disc' 'W = 'W) 我想你是这样谈论字符串插值的: pylab.title('Minimal Energy Configuration of %s Charges on Disc W = %s'%(N, W))
pylab.title('Minimal Energy Configuration of' N 'Charges on Disc' 'W = 'W)
我想你是这样谈论字符串插值的:
pylab.title('Minimal Energy Configuration of %s Charges on Disc W = %s'%(N, W))