plt.figure() python code example Example 1: matplotlib set size plt.figure(figsize=(20,8)) Example 2: import matplotlib plt import matplotlib.pyplot as plt