I tried this and unfortunately its not working, I can see the graph is maximised but when I save it down still the smaller sized version is saved. Could someone help me with this?
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.DataFrame(np.random.randint(1,10,10))
df.plot()
figManager = plt.get_current_fig_manager()
figManager.window.showMaximized()
plt.savefig('gph2.png' )
plt.show()
>Solution :
You have set the window size, but not the figure size. You can set this by doing something like
newFigure = plt.figure(figsize=(10, 10))
before saving it to the plot