How do I change the size of figures drawn with Matplotlib?

Question

How do I change the size of figure drawn with Matplotlib?

Answer

figure tells you the call signature:

from matplotlib.pyplot import figure

figure(figsize=(8, 6), dpi=80)

figure(figsize=(1,1)) would create an inch-by-inch image, which would be 80-by-80 pixels unless you also give a different dpi argument.

Filter dataframe rows if value in column is in a set list of values [duplicate]

How to delete rows from a pandas DataFrame based on a conditional expression [duplicate]