def _copy_axis_visibility(source, target):
    """
    Copies visibility and color properties from each X/Y axis in the source
    axes object to the target axes object.
    """
    if not source.get_xaxis().get_visible():
        target.get_xaxis().set_visible(False)
    if not source.get_yaxis().get_visible():
        target.get_yaxis().set_visible(False)
    target.set_facecolor(source.get_facecolor())
