close
0

Matplotlib change Figure size

avatar
asked 27-08-2022

4 Answers


0

Try

from matplotlib.pyplot import figure

figure(figsize=(8, 6), dpi=80)
avatar
answered 27-08-2022

0

Use

fig = matplotlib.pyplot.gcf()
fig.set_size_inches(18.5, 10.5)
fig.savefig('test2png.png', dpi=100)
avatar
answered 27-08-2022

0

Try

import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (20,3)
avatar
answered 27-08-2022

0

you can use

fig, ax = plt.subplots(figsize=(20, 10))
avatar
answered 27-08-2022