Fix metaarray import in MultiPlotWidget.py example and MultiPlotItem.py
This commit is contained in:
parent
ca68f05f1f
commit
baa6c4b82c
@ -10,7 +10,7 @@ from pyqtgraph.Qt import QtGui, QtCore
|
|||||||
import pyqtgraph as pg
|
import pyqtgraph as pg
|
||||||
from pyqtgraph import MultiPlotWidget
|
from pyqtgraph import MultiPlotWidget
|
||||||
try:
|
try:
|
||||||
from metaarray import *
|
from pyqtgraph.metaarray import *
|
||||||
except:
|
except:
|
||||||
print("MultiPlot is only used with MetaArray for now (and you do not have the metaarray package)")
|
print("MultiPlot is only used with MetaArray for now (and you do not have the metaarray package)")
|
||||||
exit()
|
exit()
|
||||||
@ -22,7 +22,7 @@ pw = MultiPlotWidget()
|
|||||||
mw.setCentralWidget(pw)
|
mw.setCentralWidget(pw)
|
||||||
mw.show()
|
mw.show()
|
||||||
|
|
||||||
ma = MetaArray(random.random((3, 1000)), info=[{'name': 'Signal', 'cols': [{'name': 'Col1'}, {'name': 'Col2'}, {'name': 'Col3'}]}, {'name': 'Time', 'vals': linspace(0., 1., 1000)}])
|
ma = MetaArray(random.random((3, 1000)), info=[{'name': 'Signal', 'cols': [{'name': 'Col1'}, {'name': 'Col2'}, {'name': 'Col3'}]}, {'name': 'Time', 'values': linspace(0., 1., 1000)}])
|
||||||
pw.plot(ma)
|
pw.plot(ma)
|
||||||
|
|
||||||
## Start Qt event loop unless running in interactive mode.
|
## Start Qt event loop unless running in interactive mode.
|
||||||
|
@ -9,7 +9,7 @@ from numpy import ndarray
|
|||||||
from . import GraphicsLayout
|
from . import GraphicsLayout
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from metaarray import *
|
from ..metaarray import *
|
||||||
HAVE_METAARRAY = True
|
HAVE_METAARRAY = True
|
||||||
except:
|
except:
|
||||||
#raise
|
#raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user