figure = plt.figure() code example
Example 1: import matplotlib plt
import matplotlib.pyplot as plt
Example 2: figure in matplotlib
pyplot.figure(num=None, figsize=None, dpi=None, facecolor=None,
edgecolor=None, frameon=True, FigureClass=<class 'matplotlib.figure.Figure'>,
clear=False, **kwargs)