pyqtgraph plot

A simple plot can be created with the module pyqtgraph. Mind you, it’s one of the libraries for plotting, there are others like matplotlib.

We start with importing pyqtgraph and defing the plotting data (x and y). Then we plot the data using pg.plot().

pyqtgraph plot

pyqtgraph plot

The example below creates a plot using pyqtgraph.

We can set additional properties of the chart like the labels, add a legend, the colors.
The output will look like this:
pyqtgraph plot legend

In code its like this:

Previous Post

Leave a Reply

Your email address will not be published. Required fields are marked *