I have installed Ubuntu 18 on Windows 10 using the Microsoft installation process, and been reasonably happy with its behavior. I have been developing small amounts of Python3 data analysis code using Pandas, Numpy, statistics, statsmodel. This has been working fine. I have been using Gnuplot to display some of the results. But, I want to shift to creating plots in Python on the fly. I have been using python 3.6, and tried 3.7 and 3.8 after I started having problems with pyplot.
I have not previously used pyplot. I do have experience with various other plotting contexts, including gnuplot, matlab, scilab, etc. I installed matplotlib using pip3 and also tried using apt-get, and then tried installing from the source. In each case I could get an error-message free install. But, the plot never showed on the screen. The following is the test code I have been using (mostly a piece of test code I copied from another website). I tried setting a default backend in the matplotlib config file, as well.
import matplotlib
from matplotlib import pyplot as plt
import numpy as np
import math
x = np.arange(0, math.pi*2, 0.05)
y = np.tan(x)
plt.plot(x,y)
plt.xlabel("angle")
plt.ylabel("Tan value")
plt.title('Tan wave')
plt.show()
input()