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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -