木星笔记本显示不正确的图形

时间:2020-08-16 09:55:37

标签: python arrays python-3.x matplotlib jupyter-notebook

我正在尝试创建一个随时间增加频率的方波,但是木星不知道如何处理scipy或numpy的方波信号。蜘蛛呢。为什么木星愚蠢?

Jupiter being bad

Spider showing the correct graph

1 个答案:

答案 0 :(得分:0)

我尝试了这段代码

from scipy import signal
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(0,1,100, endpoint=True)
plt.plot(t, signal.square(2* np.pi*5*t))

在Jupyter上 jupyter 和合作 colab 似乎还可以。

请,您可以重新启动内核然后重试吗?
万一它不起作用,请提供更多信息。