【发布时间】:2021-03-12 10:03:39
【问题描述】:
所以我需要格式化一个图例,使其包含的数值以标准形式表示。代码复制如下。请注意,图例标签依赖于以科学计数法编写的 k 值,尽管图例输出为 1000000.0、3000000.0 等。我该如何更改?
V = [4546.09, 13638.27, 22730.45, 31822.63, 40914.81, 50006.99, 59099.17, 68191.35]#total volume injected per well per fracture
Vgall = [1e+06, 3e+06, 5e+06, 7e+06, 9e+06, 11e+06, 13e+06, 15e+06]
for j, k in zip(V, Vgall) :
t_list = []
for i in Q_list :
t = j / i
t_list.append(t)
plt.plot(w, t_list, label=k)
plt.ylim(0,2500)
plt.ylabel('t (s)')
plt.xlabel('w')
plt.legend()
t_list.clear()
谢谢。
【问题讨论】:
标签: python formatting label legend