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()


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM