Skip to content

Acorr() creates two labels #9944

Closed
Closed
@MichaelClerx

Description

@MichaelClerx

Bug report

When acorr() is given a label, it uses it for two different lines, resulting in two near-identical entries in the legend.

Code for reproduction

#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt

x = np.random.normal(0, 10, 1000)

plt.figure()
plt.acorr(x, label='x')
plt.legend(loc='upper right')
plt.show()

Actual outcome

figure_1

Expected outcome

figure_2

Matplotlib version

  • Matplotlib version: 2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions