plt设置横纵坐标名称

#设置横纵坐标的名称以及对应字体格式
font2 = {'family' : 'Times New Roman',
    'weight' : 'normal',
    'size' : 15
    }
plt.xlabel('Year',font2)
plt.ylabel('Citations',font2)

 

fig = plt.figure(figsize=(20, 12), dpi=80)

# 设置坐标轴刻度
y = range(0,400,50)

plt.plot(table[2][:116], 'ro-', label='Einstein. Albert; 1905')
plt.yticks(y)
plt.legend()

#设置横纵坐标的名称以及对应字体格式
font2 = {'family' : 'Times New Roman',
    'weight' : 'normal',
    'size' : 15
    }
plt.xlabel('Distance to the publication year',font2)
plt.ylabel('Citations',font2)

plt.show()
posted on 2021-11-03 19:38  cookie的笔记簿  阅读(1970)  评论(0编辑  收藏  举报