I am running a short (three lines) Python example (example_plot.py) with matplotlib using Windows 10 IDLE and it works fine and shows the graph. However, after compiling the example using pyinstaller and running the example_plot.exe file with the command line (CMD) the program runs for a split of a second and does not display the graph. Other programs (without matplotlib) that I wrote and compiled using pyinstaller work fine. Any help is appreciated. My example program is listed below:
import matplotlib.pyplot as plt
plt.plot(range(5))
plt.show()