简体   繁体   中英

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

I have started with vispy but I cannot plot a line of data.

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. I think python 3.6 use pyqt 5 and I'm not sure that vispy is compatible with this version of Qt. If it doesn't works, try to create a python 3.5 environment (it should have pyqt 4 installed). Then re-installed vispy an try your example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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