python - How to create pie chart with pyqtgraph.GraphicsWindow and create custom scale in x axis -


i doing project needs create piecharts pyqtgraph library. can make column charts , line charts using pyqtgraph.graphicswindow,but can't find out how create piechart. there methods can me accomplish that?

another problem, don't know how change x axis scale discrete settings. example, when make column chart, want set number '5' first column, '7' second column,'16' third column.....how can implement this?

for first problem, pyqtgraph has no built-in pie chart graphics. however, these should simple construct creating 1 qgraphicsellipseitem each wedge.

for second, use following:

majortickvalues = [(0,"5"),(1,"7"),(2,"16")] plotitem.getaxis('bottom').setticks([majortickvalues]) 

Comments