9951 explained code solutions for 126 technologies

python-matplotlibHow to use figsize()

Using figsize() allows specifying figure size in inches:

import matplotlib.pyplot as plt
plt.figure(figsize=(3, 3))
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities


change figure params


set figure size in inches (also set dpi to specify inch size in pixels)


plot specified data


render chart in a separate window