0
votes

I have a code to plot live data on a polar graph. I send two arrays to a function (real and imaginary values) where I update the data of the polar graph to make it live. It works but I constantly get this error message:

Error image

main_T2.py is my main code which calls a function in a class. That class is below:

import pyqtgraph as pg
from PyQt5.QtWidgets import QMainWindow
from PyQt5.QtCore import pyqtSlot, pyqtSignal

from Ui_GraphicsLayout import Ui_GraphicsLayout #pyqt layout class that configures the graph window

class Polar(QMainWindow):

    def __init__(self, title = "Time Domain Plot", name = "Channel"):
        super().__init__()

        pg.setConfigOption('background', 'w')

        self.__ui = Ui_GraphicsLayout()
        self.__ui.setupUi(self)

        self.setWindowTitle("Measurement System - {:s}".format(title))

        self.__plot = self.__ui.widget.addPlot(title = name, row = 0, col = 0);
        self.__pditem = self.__plot.plot(pen=None, symbol = 'o', symbolSize=5)

        self.__plot.setAspectLocked()
        self.__plot.addLine(x=0, pen=0.2)
        self.__plot.addLine(y=0, pen=0.2)

    def plot(self, data1, data2):  
        self.__pditem.setData(data1,data2)

Does anyone know how to fix this error message?

1
I realised that if you update it really fast it gives this error. Slowing it down solved the problem - Toykan Ozdeger

1 Answers

0
votes

I realised that if you update it really fast it gives this error. Slowing it down solved the problem