def xylabel_subplots(fig, y_axis_labels=None, x_axis_labels=None):
    """Set x-axis label and y-axis label for each sub plot in figure

    Note: labels are applied to axes in the order they were created, which
    is not always the way they appear in the figure.

    Parameters
    ----------
    fig : matplotlib.Figure
        Figure to apply labels to.
    y_axis_labels : sequence
        Label to place on y-axis of each subplot.  Use None to skip a subplot.
        Default y_axis_label=None
    x_axis_labels : sequence
        Label to place on x-axis of each subplot.  Use None to skip a subplot.
        Default x_axis_label=None.


    """
    if not y_axis_labels is None:
        for i, label in enumerate(y_axis_labels):
            if not label is None:
                fig.axes[i].set_ylabel(label)
    if not x_axis_labels is None:
        for i, label in enumerate(x_axis_labels):
            if not label is None:
                fig.axes[i].set_xlabel(label)
    return
