在圖例框中放大和設置標記的alpha
值(回到1.0)的最方便的方法是什麼?我對大彩盒也很滿意。在matplotlib的圖例框中更改標記的大小/ alpha
import matplotlib.pyplot as plt
import numpy as np
n = 100000
s1 = np.random.normal(0, 0.05, n)
s2 = np.random.normal(0, 0.08, n)
ys = np.linspace(0, 1, n)
plt.plot(s1, ys, ',', label='data1', alpha=0.1)
plt.plot(s2, ys, ',', label='data2', alpha=0.1)
plt.legend(bbox_to_anchor=(1.005, 1), loc=2, borderaxespad=0.)
的可能的複製[與matplotlib集傳奇符號透明度?(http://stackoverflow.com/questions/12848808/set-legend-symbol-opacity-with-matplotlib) – CaptainKinematics