pyqtgraph bar chart

The module pyqtgraph supports all kinds of charts and scientific graphics. Underneath, pyqtgraph uses PyQt4 / PySide and numpy. Its been tested to work on Linux, Windows, and OSX.

In this article we’ll create an example bar chart. The output will be this awesome chart:

pyqtgraph barchart

pyqtgraph barchart

We create the data to plot (x y1) first. y1 is a list of 20 floats that we create using the numpy method linspace.

Then create the barchart using the method BarGraphItem(), where the parameters are x, y, bar width and color.

Previous Post
Next Post

Leave a Reply