Skip to content

Legend placement bug #1235

Closed
Closed
@dmcdougall

Description

@dmcdougall

This script produces a legend that covers the red point:

import matplotlib.pyplot as plt

colors = ['b','g','r']
for n in range(3):
    plt.scatter([n,],[n,],color=colors[n])
plt.legend(['foo','foo','foo'],loc='best')
plt.gca().set_xlim(-0.5, 2.2)
plt.gca().set_ylim(-0.5, 2.2)
plt.show()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions