I'm confused about what the different between axes
and axis
is in matplotlib. Could someone please explain in an easy-to-understand way?
3 Answers
This figure from the documentation will answer your question:
You can find this image here (in the Matplotlib 1.x docs); it's actually been replaced in the Matplotlib 2.x docs.
-
3There is an equivalent image in current documentation, which many other concepts explained: matplotlib.org/stable/tutorials/introductory/…– abuJan 28, 2022 at 20:22
-
Thanks for the update. I think that the old figure is more on point for the relevant question here. Mar 13, 2022 at 7:33
-
Yes, I agree. I decided to provide the new link just in case the old one stops working. But the old figure is much better to ilustrate the axes/axis difference.– abuMar 13, 2022 at 19:44
Axis is the axis of the plot, the thing that gets ticks and tick labels. The axes is the area your plot appears in.
-
15Is one supposed to get less confused or more confused with this? You say "the axis of the plot, the thing that ..." as if there's a single axis, a single "thing"!! May 30, 2018 at 15:51
in the context of matplotlib,
axes is not the plural form of axis, it actually denotes the plotting area, including all axis.
-
22
-
I also feel it confusing, especially axes is just plural form of axis in English. Nov 8, 2022 at 2:29