Jordan A.
Jordan A.

Reputation: 384

matplotlib figure vs subplot vs axes?

Though I've been able to create basic plots with matplotlib.pyplot before, I cannot fully understand what the difference between these are:

As I understand, all three of these are objects for the area in which a graph is drawn, so what distinguishes them in terms of what can be drawn inside them?

Upvotes: 6

Views: 4226

Answers (2)

J R
J R

Reputation: 579

The components are hierarchical:

Figure object: the whole figure

Axes object: belongs to a Figure object and is the space where we add the data to visualize

Axis object: belongs to an Axes object. Axis object can be categorized as XAxis or YAxis.

For further info, visit this link:

Getting Started with Matplotlib

Upvotes: 0

Ic3fr0g
Ic3fr0g

Reputation: 1219

Matplotlib's user guide gives a great description about the parts of a figure.

Upvotes: 5

Related Questions