Skip to content

deprecation warning #13

@sserkez

Description

@sserkez

curretlny the code works with pyqtgraph v 0.10.0

if upgraded to 0.11.0, the exception will arise:

File "/home/andrei/Documents/pyhirex/hirex.py", line 291, in init
    self.analysistool = AnalysisInterface(parent=self)
  File "/home/andrei/Documents/pyhirex/analysis_spec.py", line 57, in init
    self.add_hist_full_widget()
  File "/home/andrei/Documents/pyhirex/analysis_spec.py", line 370, in add_hist_full_widget
    self.histogram_full_curve = self.histogram_full.plot(stepMode=True,  fillLevel=0,  brush=(100,100,100,100))
  File "/home/andrei/anaconda3/lib/python3.8/site-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py", line 640, in plot
    item = PlotDataItem(*args, **kargs)
  File "/home/andrei/anaconda3/lib/python3.8/site-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 185, in init
    self.setData(*args, **kargs)
  File "/home/andrei/anaconda3/lib/python3.8/site-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 453, in setData
    self.updateItems()
  File "/home/andrei/anaconda3/lib/python3.8/site-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 497, in updateItems
    self.curve.setData(x=x, y=y, **curveArgs)
  File "/home/andrei/anaconda3/lib/python3.8/site-packages/pyqtgraph/graphicsItems/PlotCurveItem.py", line 335, in setData
    self.updateData(*args, **kargs)
  File "/home/andrei/anaconda3/lib/python3.8/site-packages/pyqtgraph/graphicsItems/PlotCurveItem.py", line 382, in updateData
    raise Exception("len(X) must be len(Y)+1 since stepMode=True (got %s and %s)" % (self.xData.shape, self.yData.shape))
Exception: len(X) must be len(Y)+1 since stepMode=True (got (0,) and (0,))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions