Matplotlib does not work from Python console in interactive mode v 2017.1
Completed
Hello,
I am trying to plot some data using matplotlib in interactive mode using IntelliJ Idea 2017.1 with Python plugin.
This works, but blocks the console until I close the plot:
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.show()
This does not work - a grey window shows with hourglass cursor, and I have to kill the process to get rid of it:
import matplotlib.pyplot as plt
plt.ion()
plt.plot([1, 2, 3, 4])
plt.show(block=false) without interactive mode gives the same results.
My environment:
- Windows7
- Python 2.7.12
- Anaconda 4.0.0 64 bit
- Matplotlib 1.5.1
This has stopped working after I have upgraded from 2016.3 to 2017.1.
Please sign in to leave a comment.
Looks like this issue has already been addressed in this post: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000143610-Problems-with-Interactive-Plotting-in-Debug-Mode-in-PyCharm-Version-2017-1
Need to set environment variables DISPLAY=True;PYTHONBUFFERED=1