Hi,
I try to create stacked 3d bar graph using gl.GLBarGraphItem. For that I
need to loop through layers and paint each one in a different way. For some
reason this does not work:
bg = gl.GLBarGraphItem(pos, size)
arg = 'r'
bg.setColor(arg)
I tried various values to be put inside setColor function but with no
success. It always returns following error:
|==============================>>
| Traceback (most recent call last):
| File "<string>", line 1, in <module>
| File
"C:\Users\chroustovskyj\AppData\Local\Programs\Python\Python36\lib\idlelib\run.py",
line 142, in main
| ret = method(*args, **kwargs)
| File
"C:\Users\chroustovskyj\AppData\Local\Programs\Python\Python36\lib\idlelib\run.py",
line 457, in runcode
| exec(code, self.locals)
| File
"C:\Users\chroustovskyj\Desktop\Dev_py\New_App\PYQTgraph\PYQTgraph_1.08.py",
line 46, in <module>
| QtGui.QApplication.instance().exec_()
| File
"C:\Users\chroustovskyj\AppData\Local\Programs\Python\Python36\lib\site-packages\pyqtgraph\opengl\GLViewWidget.py",
line 179, in paintGL
| self.drawItemTree(useItemNames=useItemNames)
| File
"C:\Users\chroustovskyj\AppData\Local\Programs\Python\Python36\lib\site-packages\pyqtgraph\opengl\GLViewWidget.py",
line 219, in drawItemTree
| self.drawItemTree(i, useItemNames=useItemNames)
| File
"C:\Users\chroustovskyj\AppData\Local\Programs\Python\Python36\lib\site-packages\pyqtgraph\opengl\GLViewWidget.py",
line 200, in drawItemTree
| debug.printExc()
| --- exception caught here ---
| File
"C:\Users\chroustovskyj\AppData\Local\Programs\Python\Python36\lib\site-packages\pyqtgraph\opengl\GLViewWidget.py",
line 197, in drawItemTree
| i.paint()
| File
"C:\Users\chroustovskyj\AppData\Local\Programs\Python\Python36\lib\site-packages\pyqtgraph\opengl\items\GLMeshItem.py",
line 186, in paint
| glColor4f(*color)
| TypeError: this function takes 4 arguments (3 given)
|==============================<<
Error while drawing item
<pyqtgraph.opengl.items.GLBarGraphItem.GLBarGraphItem object at
0x0000017541A519C8>.
Any tip how to get over this problem? Thanks!
--
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/e9e9610a-d8cf-460f-977f-618171a5a738%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.