Sahaj.blogs

Day page

1 Apr 2024

Study

Matplotlib · Figure and Axes

Matplotlib's object model: the Figure as the canvas and Axes as one plot, and why the explicit fig, ax = plt.subplots() style is clearer.

  • A Figure is the whole canvas; an Axes is one plot with its own x and y axis.
  • The explicit fig, ax style scales better than the implicit plt.* state machine.

Read the post →