{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Manage multiple figures in pyplot\n\n`matplotlib.pyplot` uses the concept of a *current figure* and *current Axes*.\nFigures are identified via a figure number that is passed to `~.pyplot.figure`.\nThe figure with the given number is set as *current figure*. Additionally, if\nno figure with the number exists, a new one is created.\n\n
We discourage working with multiple figures through the implicit pyplot\n interface because managing the *current figure* is cumbersome and\n error-prone. Instead, we recommend using the explicit approach and call\n methods on Figure and Axes instances. See `api_interfaces` for an\n explanation of the trade-offs between the implicit and explicit interfaces.