Thanks to visit codestin.com
Credit goes to github.com

Skip to content

plt.ginput broken on 2.1.0: plot does not appear #9758

Closed
@kevinji

Description

@kevinji

Bug report

Bug summary: When calling plt.ginput, the icon for the graphics library (Qt5 for my case) will appear, but the actual plot does not appear, making it impossible to select icons. Other plt calls like plt.show() work fine. This issue is absent on 2.0.2.

I've confirmed that the changes in #8305 are the issue; reverting those changes manually fixes the problem. However, since it looks like that PR fixed another issue; I'm not sure what the right thing to do is.

Code for reproduction: See https://matplotlib.org/examples/pylab_examples/ginput_demo.html without the final line:

import matplotlib.pyplot as plt
import numpy as np

t = np.arange(10)
plt.plot(t, np.sin(t))
print("Please click")
x = plt.ginput(3)
print("clicked", x)

Matplotlib version

  • Operating system: macOS 10.13.1
  • Matplotlib version: 2.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg (also tried TkAgg)
  • Python version: 3.6.3 (installed via Homebrew)

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