@image_comparison(baseline_images=['divider_append_axes'])
def test_divider_append_axes():
    np.random.seed(0)
    x = np.random.randn(1000)
    y = np.random.randn(1000)
    (fig, axScatter) = plt.subplots()
    axScatter.scatter(x, y)
    divider = make_axes_locatable(axScatter)
    axHistbot = divider.append_axes('bottom', 1.2, pad=0.1, sharex=axScatter)
    axHistright = divider.append_axes('right', 1.2, pad=0.1, sharey=axScatter)
    axHistleft = divider.append_axes('left', 1.2, pad=0.1, sharey=axScatter)
    axHisttop = divider.append_axes('top', 1.2, pad=0.1, sharex=axScatter)
    binwidth = 0.25
    xymax = max(np.max(np.abs(x)), np.max(np.abs(y)))
    lim = ((int((xymax / binwidth)) + 1) * binwidth)
    bins = np.arange((- lim), (lim + binwidth), binwidth)
    axHisttop.hist(x, bins=bins)
    axHistbot.hist(x, bins=bins)
    axHistleft.hist(y, bins=bins, orientation='horizontal')
    axHistright.hist(y, bins=bins, orientation='horizontal')
    axHistbot.invert_yaxis()
    axHistleft.invert_xaxis()
    axHisttop.xaxis.set_ticklabels(())
    axHistbot.xaxis.set_ticklabels(())
    axHistleft.yaxis.set_ticklabels(())
    axHistright.yaxis.set_ticklabels(())
@image_comparison(baseline_images=['divider_append_axes'])
def test_divider_append_axes():
    np.random.seed(0)
    x = np.random.randn(1000)
    y = np.random.randn(1000)
    (fig, axScatter) = plt.subplots()
    axScatter.scatter(x, y)
    divider = make_axes_locatable(axScatter)
    axHistbot = divider.append_axes('bottom', 1.2, pad=0.1, sharex=axScatter)
    axHistright = divider.append_axes('right', 1.2, pad=0.1, sharey=axScatter)
    axHistleft = divider.append_axes('left', 1.2, pad=0.1, sharey=axScatter)
    axHisttop = divider.append_axes('top', 1.2, pad=0.1, sharex=axScatter)
    binwidth = 0.25
    xymax = max(np.max(np.abs(x)), np.max(np.abs(y)))
    lim = ((int((xymax / binwidth)) + 1) * binwidth)
    bins = np.arange((- lim), (lim + binwidth), binwidth)
    axHisttop.hist(x, bins=bins)
    axHistbot.hist(x, bins=bins)
    axHistleft.hist(y, bins=bins, orientation='horizontal')
    axHistright.hist(y, bins=bins, orientation='horizontal')
    axHistbot.invert_yaxis()
    axHistleft.invert_xaxis()
    axHisttop.xaxis.set_ticklabels(())
    axHistbot.xaxis.set_ticklabels(())
    axHistleft.yaxis.set_ticklabels(())
    axHistright.yaxis.set_ticklabels(())