'How to fix BarGraphItem height of a plot using PyQtgraph

How to fix BarGraphItem height when zoom in or zoom out pyqtgraph plot, it should be similar with axis font, the font size is in pixel, please someone helps, thank you very much, basic code as below:

import numpy as np

import pyqtgraph as pg

pg.setConfigOption('leftButtonPan', False)

win = pg.plot()
win.setWindowTitle('pyqtgraph example: BarGraphItem')

x = np.arange(10)

bg1 = pg.BarGraphItem(x=x, height=5, width=1,brush='r')

win.addItem(bg1)
win.setYRange(0,110)

win.setLimits(yMin=0,yMax=110,xMin=-0.5,xMax=11)


if name == 'main':
    pg.exec()


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source