Python 是否在ax.set\u标题中包含多个变量?

Python 是否在ax.set\u标题中包含多个变量?,python,matplotlib,Python,Matplotlib,我有这个标题,其中变量选项表示区域级别 option=3 year=2017 ax.set_title('Household Gas Consumption, Water Heating,NUTS %.i'%option,fontdict={'fontsize':'10','fontweight':'3'}) 如何添加变量year,使标题看起来像这样 Household Gas Consumption, Water Heating, NUTS 3, Year: 2017 我尝试了不

我有这个标题,其中变量
选项
表示区域级别

option=3
year=2017

    ax.set_title('Household Gas Consumption, Water Heating,NUTS %.i'%option,fontdict={'fontsize':'10','fontweight':'3'})
如何添加变量
year
,使标题看起来像这样

Household Gas Consumption, Water Heating, NUTS 3, Year: 2017
我尝试了不同的方法,但都没能成功。提前谢谢

'Household Gas Consumption, Water Heating,NUTS %i Year: %i' %(option , year)