import matplotlib
print("Backend used by matplotlib is: ", matplotlib.get_backend())
matplotlib.use('Qt5Agg')
print("Backend used by matplotlib is: ", matplotlib.get_backend())
