Matplotlib's default background is agg
, which doesn't have GUI.
It means that show()
doesn't show any plots on GUI.
That will never show any window, your matplotlib is configured to use agg, which is no gui version of output. Install a gui backend like python-matplotlib-qt4, python-matplotlib-tk and try again. https://forums.opensuse.org/showthread.php/494173-matplotlib-fails-to-show-plots-after-latest-update-from-the-Sciencerepolistory
So, let's configure Matplotlib to use TkAgg, which is really easy to set up:
$ sudo zypper in tk-devel
$ pyenv install 3.6.1
$ pip install numpy matplotlib
Matplotlib requires TkInter, and tk-devel
must be installed before building Python.
ref: https://wiki.python.org/moin/TkInter
Then, open matplotlibrc
to set the backend to TkAgg:
$ vi ~/.config/matplotlib/matplotlibrc
Put the backend setting like this:
backend: TkAgg
That's it.