import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import sys
print(sys.version)
print('Matplotlib version:', mpl.__version__)
t = np.linspace(0, 2*np.pi, 1000)
fig, ax = plt.subplots(figsize=(20, 20))
ax.plot(np.cos(t), np.sin(t))
plt.show()
I am running this script on Spyder 4.0 and displaying on a small monitor. The frame just fills up the monitor and makes what should be a circle look like an ellipse.
The print statements give this output:
Python version: 3.7.6
Matplotlib version: 3.3.3
I want the frame as big as I want. I adapted this solution and changed the import statements to:
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import platform
The plot fails to show, with this message:
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()