def col_num(ax: mpl.axes.Axes) -> int: """Gets the column number of a subplot axis in a figure.""" return ax.get_subplotspec().colspan.start
def row_num(ax: mpl.axes.Axes) -> int: """Gets the row number of a subplot axis in a figure.""" return ax.get_subplotspec().rowspan.start