In short, it targets a subplot within a grid.
If you have nrows=2
and ncols=2
, for example, then ax
allows you to plot on a specific axis by passing ax=axes[0,0]
(top left) or ax=axes[1,1]
(bottom right), etc.
When you create the subplots, you receive an axes
variable. You can later plot (or subplot) with an element of that axes
variable as above.
Take a look at the "Targeting different subplots" section of this page: http://pandas.pydata.org/pandas-docs/dev/visualization.html#targeting-different-subplots
I hope this helps.