In pycharm, how does the chart displayed by matplotlib.pyplot.show () pop up when output to sciview,?

< H2 > 1. Question: < / H2 >

like the title, how does the chart displayed by matplotlib.pyplot.show () in pycharm pop up to sciview,?

< H2 > 2. Code: < / H2 >
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import style


style.use("fivethirtyeight")

fig = plt.figure(figsize=(9, 6))
ax1 = fig.add_subplot(1, 1, 1)


def animate(i):
    graph_data = open("result.txt", "r").read()
    lines = graph_data.split("\n")
    xs = []
    ys = []
    for line in lines:
        if len(line) > 1:
            x, y = line.split(" ")
            xs.append(int(x))
            ys.append(int(y))
    ax1.clear()
    ax1.plot(xs, ys)


ani = animation.FuncAnimation(fig, animate, interval=1000)
plt.show()

result.txt contains data, two columns and a space in the middle. Format:
0 9057
1 9239
2 9262
3 9339

< H2 > 3. Running result: < / H2 >

I am a notebook, pycharm version 2017.3.1python version 3.6.4:

pycharm2017.2.4python3.6.2:

this effect is exactly what I want, but my computer can"t run, what"s the problem?

< H2 > 4. Think for yourself: < / H2 >

I output the results directly to the SciView window. In View-Tool Windows, you can see this option, but on the pycharm of the desktop I tested, View-Tool Windows does not have this option, so it should be the pycharm version.
is executed in cmd, which is normal, but not in pycharm. What to do if we don"t find it? Baidu SciView, results are very few.
ask for help.

Menu