Problem when drawing plots with matplotlib

  • Hello,

    I have my interface which contained 4 tabs. In every tab, I have a button called generate graph which generates graph when it is clicked. I can plot the first figure but when I try to plot the second, the interface crashes and no plot is represented. I used the library matplotlib to do that. Here is my code :

    fig = plt.figure(self.numFiguresPlot2_1)
     x = np.arange(0, self.stockParam.nTotZones, 1);
    y = pd.to_numeric(matrix4["Price"])
    print("Moyenne = ")
    z = pd.to_numeric(matrix4["Adjust"]*y)/100 + y
    price = plt.plot(x, y, label = ("Price"))
     shadowPrice = plt.plot(x, z, label = ("Price + adjust for iteration "+self.DropDownListDisplayIter2_1.currentText()))

    Can you help me ?

  • @EJWA I see nothing Qt related in your question, did you post to the right forum?

  • Oh yes, it is a problem with matplotlib. I must search for another forum.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.