def get_total_figure_number(axis_matrix):
    """
        Gets the number of figures from an axis_matrix generated by pyplot. Used by the hash to place configs in the
        correct part of the axis_matrix

        Parameters:
            axis_matrix (1D or 2D numpy array) = Array returned by pyplot once multiple figures are introduced into
            a single plot

        Returns:
            total_figure_number (int) = Total number of figures
    """
    # Get the number of figures, using the axis_matrix
    try:
        total_figure_number = axis_matrix.shape[0] * axis_matrix.shape[1]
    except IndexError:
        total_figure_number = axis_matrix.shape[0]
    return total_figure_number