pip install pyqtgraph
python
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui
QtGui.QApplication([])
python
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui
app = QtGui.QApplication([])
win = pg.GraphicsWindow()
plot = win.addPlot()
x = [1, 2, 3, 4, 5]
y = [1, 2, 3, 4, 5]
plot.plot(x, y)
app.exec_()
python
scatter_plot = plot.plot(x, y, pen=None, symbol='o')
bar_plot = pg.BarGraphItem(x=x, height=y, width=0.6, brush='r')
plot.addItem(bar_plot)
python