Hi,

Do you happen to have two monitors, with different DPI scaling on each? Or 
just a hiDPI monitor? I have a feeling someone reported an issue with hiDPI 
screens before, but the forums are being glitchy at the moment and search 
isn't working...

Patrick

On Saturday, 14 March 2020 12:55:27 UTC+10:30, Michael Beachy wrote:
>
> To All, 
> Thank you for any assistance. I am new to programming. 
>
> When I create a simple code, my Plotwidget displays a graph where the data 
> does not match the axis and axis do not even intersect. Nothing I do to the 
> code seems to fix it. 
>
> I installed Python 3.8
> I just installed PyQt5 following the instructions at the Riverbank site 
> using windows powershell and PIP. 
>
> Windows10
> Using VSCode. 
>
> Anyways, anybody know whats going on and how to fix it. I was having fun 
> with python PyQt5 as it was doing a lot of what I wanted but I noticed when 
> I use the plotwidget() I get this behavior. 
> Is it better implement MatplotLib instead of plotwidget() and put it into 
> a QWidget? Basically, I would like to build a realtime graph with 
> temperature data. There seems to be a million ways to do this. 
>
> //CODE
> from PyQt5 import QtWidgets, uic
> from pyqtgraph import PlotWidget, plot
> import pyqtgraph as pg
> import sys  # We need sys so that we can pass argv to QApplication
> import os
>
> class MainWindow(QtWidgets.QMainWindow):
>
>     def __init__(self, *args, **kwargs):
>         super(MainWindow, self).__init__(*args, **kwargs)
>
>         self.graphWidget = pg.PlotWidget()
>         self.setCentralWidget(self.graphWidget)
>
>         hour = [1,2,3,4,5,6,7,8,9,10]
>         temperature = [30,32,34,32,33,31,29,32,35,45]
>
>         # plot data: x, y values
>         self.graphWidget.plot(hour, temperature)
>
>
> def main():
>     app = QtWidgets.QApplication(sys.argv)
>     main = MainWindow()
>     main.show()
>     sys.exit(app.exec_())
>
>
> if __name__ == '__main__':
>     main()
> //Code
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/f1600a8f-ecd5-440f-ba62-baacbffeefd2%40googlegroups.com.

Reply via email to