1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python, matplotlib pyplot show() not blocking

Discussão em 'Python' iniciado por Stack, Outubro 24, 2024.

  1. Stack

    Stack Membro Participativo

    I'm having trouble with the show() function not blocking. I've taken over a python application from someone that left and I seem to remembering this worked on his (IT reclaimed) PC. Here's the code ...

    import matplotlib.pyplot as plt

    plt.title("Molding X Error")
    plt.xlabel("X")
    plt.ylabel("X Error")
    plt.plot( ... details that work and not the problem ... )
    plt.show(block=True)

    plt.title("Molding Y Error")
    plt.xlabel("Y")
    plt.ylabel("Y Error")
    plt.plot( ... details that work and not the problem ... )
    plt.show(block=True)


    On the other guys PC, the first show() would display appropriately. After dismissing the first, the second would display.

    I run it, and it not only doesn't stop on the first show(), it combines data from both the first and second with the title and labels from the second.

    I step through with the debugger, and the first does show, but stepping to the second the same result is seen.

    Windows 7 Pro 64-bit. Python2.7.10, Anaconda 2.3.0 which contains (apparently) matplotlib1.4.3

    Note: I did read through "(python) matplotlib pyplot show() .. blocking or not?" where it was from 2011 and was referring to matplotlib1.0.1 as a solution.

    Continue reading...

Compartilhe esta Página