create_axes

MapsGrid.create_axes(ax_init, name=None)

Create (and return) an ordinary matplotlib axes.

Note: If you intend to use both ordinary axes and Maps-objects, it is recommended to use explicit β€œm_inits” and β€œax_inits” dicts in the initialization of the MapsGrid to avoid the creation of overlapping axes!

Parameters:

ax_init (set) – The GridSpec specifications for the axis. use ax_inits = (<row>, <col>) to get an axis in a given grid-cell use slice(<start>, <stop>) for <row> or <col> to get an axis that spans over multiple rows/columns.

Returns:

ax – The matplotlib axis instance

Return type:

matplotlib.axist

Examples

>>> ax_inits = dict(top = (0, slice(0, 2)),
>>>                 bottom_left=(1, 0))
>>> mg = MapsGrid(2, 2, ax_inits=ax_inits)
>>> mg.m_top.plot_map()
>>> mg.m_bottom_left.plot_map()
>>> mg.create_axes((1, 1), name="bottom_right")
>>> mg.ax_bottom_right.plot([1,2,3], [1,2,3])