0

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()
DaveyDaveDave
  • 9,821
  • 11
  • 64
  • 77
user7454761
  • 53
  • 1
  • 7

1 Answers1

1

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.

Etienne Cmb
  • 131
  • 7
  • yes it's work, but i have error with my x list: TypeError: Too many coordinates given (7; max is 2). – user7454761 Feb 01 '17 at 12:43
  • I don't have this error, but I use the developer version of vispy `pip install -e git+https://github.com/vispy/vispy#egg=vispy-dev` – Etienne Cmb Feb 01 '17 at 15:20