-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
It's not about the edgecolor of the legend box, but of the legend items (if they are a patch). In the following example, the clear border around the patches in the legend is a bit surprising to me, and contrasts the look of the figure itself.
Example code:
fig, ax = plt.subplots()
ax.hist(np.random.randn(1000), alpha=0.5, label='group 1')
ax.hist(np.random.randn(1000) + 2, alpha=0.5, label='group 2')
ax.legend()
As a notebook: http://nbviewer.jupyter.org/gist/jorisvandenbossche/68b2831ea2b87c76d944e93edc134d59
This issue now surfaces because the default changed to no border for patches, and as such for the histogram in this example (before 2.0, this would not be an issue with the default look). And it becomes more apparent due to the use of a lower alpha in this specific example.
Not sure if this is still the case with master, but I tested with matplotlib 2.0.0b4, on Python 3.5 / Ubuntu (installed from conda-forge)
