Skip to content

2.0 dev legend breaks on scatterplot #6685

Closed
@story645

Description

@story645

With the changes to legend introduced with #6424, it can be really hard to differentiate the legend from the scatter points:

index

This was generated using:

import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.scatter(np.random.rand(50), np.random.rand(50), label="r1")
ax.scatter(np.random.rand(50), np.random.rand(50), label="r2")
ax.legend(frameon=True, fancybox=True)

This code also displays a secondary issue, which is that frameon/fancybox appear to no longer work, so the user can't manually rectify the issue.

@tacaswell suggested that 2.0 introduce a gray background for legend so there's differentiation. Should this be universal? (I dunno if there's a way to inspect the plot type & if it's worth putting that overhead in legend)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions