Hello,
What is the way I can plot a bar chart in a graphics view created with Qt
Designer?
Following an example I found, I tried the following without success. The
variable gv_spec is a graphics view item promoted to a PlotWidget in
Designer.
curve2 = self.gv_spec.plot()
y1 = np.linspace(0, np.floor(x_time[-1]/fs), data2.shape[0])
bg1 = pg.BarGraphItem(x=data2, height=y1, width=0.6, brush='r')
curve2.addItem(bg1)
This yields the error: AttributeError: 'PlotDataItem' object has no attribute
'addItem'
My goal is simply to change from a line graph to a bar chart. This line that I
was using works fine in displaying the line graph.
curve2 = self.gv_spec.plot(data2, clickable=True,
fillBrush=pg.mkBrush(0, 255, 0, 100), fillLevel=0)
How can I convert this line graph to a bar chart?
--
You received this message because you are subscribed to the Google Groups
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/9eec9e46-39a5-4983-8113-d188fc36032d%40googlegroups.com.