[Python] PYQt graph plot widget output not plotting as required

Discussão em 'Python' iniciado por Stack, Março 27, 2025.

  1. Stack

    Stack Membro Participativo

    Can please someone help me with pyqt graph output. The issue is it looks like y axis is floating. There is gap from 0 to 5 on y axis as shown in figure below: enter image description here

    Please assist. Thanks!

    This is a simple testing code:

    import sys
    from PyQt5.QtWidgets import QApplication
    import pyqtgraph as pg

    app = QApplication(sys.argv)
    pg.plot(x = [0,1,2,4], y = [5,6,7,8])
    status = app.exec_()
    sys.exit(status)


    A possible solution for the problem

    Continue reading...

Compartilhe esta Página