[1]
折线图
代码
import numpy as np
import matplotlib.pyplot as plt
# x轴刻度标签
x_ticks = ['a', 'b', 'c', 'd'...plt.hlines(3, 0, len(x)-1, colors = "#000000", linestyles = "dashed")
# 添加x轴和y轴刻度标签
plt.xticks([r for...柱状图
代码
import numpy as np
import matplotlib.pyplot as plt
# x轴刻度标签
x_ticks = ['a', 'b', 'c', 'd', 'e...y轴刻度标签
plt.xticks([r + barWidth/2 for r in x1], x_ticks, fontsize=18)
plt.yticks(fontsize=18)
# 添加x轴和.../figure.pdf', bbox_inches='tight')
# 显示图片
plt.show()
效果
?
Reference
[1]
如何在论文中画出漂亮的插图?