简体   繁体   English

python3.6 vispy plot错误白屏和数据不出现

[英]python3.6 vispy plot error white screen and data not appear

I have started with vispy but I cannot plot a line of data. 我已经从vispy开始,但是我无法绘制一行数据。

I see a lot of examples which have used package but that doesn't work either. 我看到了很多使用软件包的示例,但它们也不起作用。

I have a white window and my line does not appear, why? 我有一个白色的窗口,但没有显示行,为什么?

This is my code: 这是我的代码:

import numpy as np
from vispy import plot as vp

fig = vp.Fig(size=(600, 500), show=True)

x=[0,1,2,3,4,5,6]
y=x
line = fig[0, 0].plot((x, y), width=3, color='k')
fig.show()

Can you try: 你能试一下吗:

fig.show(run=True)

It works on my system. 它适用于我的系统。 Otherwise, it might comes from the pyqt version. 否则,它可能来自pyqt版本。 I think python 3.6 use pyqt 5 and I'm not sure that vispy is compatible with this version of Qt. 我认为python 3.6使用pyqt 5,但我不确定vispy是否与此版本的Qt兼容。 If it doesn't works, try to create a python 3.5 environment (it should have pyqt 4 installed). 如果不起作用,请尝试创建python 3.5环境(应安装pyqt 4)。 Then re-installed vispy an try your example. 然后重新安装vispy并尝试您的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM