<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_wigner2d(iradon_output, bin_centres, cmap=_cm.cubehelix_r, figsize=(6, 6)):
 """ Plots the wigner space representation as a 2D heatmap. Parameters iradon_output : ndarray 2d array of size (histbins x histbins) bin_centres : ndarray positions of the bin centres cmap : matplotlib.cm.cmap, optional (default=cm.cubehelix_r) color map to use for Wigner figsize : tuple, optional (default=(6, 6)) tuple defining size of figure created Returns ------- fig : matplotlib.figure.Figure object figure showing the wigner function ax : matplotlib.axes.Axes object axes containing the object """

    xx, yy = _np.meshgrid(bin_centres, bin_centres)
    resid1 = iradon_output.sum(axis=0)
    resid2 = iradon_output.sum(axis=1)
    
    wigner_marginal_seperation = 0.001
    left, width = 0.2, 0.65-0.1 # left = left side of hexbin and hist_x
    bottom, height = 0.1, 0.65-0.1 # bottom = bottom of hexbin and hist_y
    bottom_h = height + bottom + wigner_marginal_seperation
    left_h = width + left + wigner_marginal_seperation
    cbar_pos = [0.03, bottom, 0.05, 0.02+width]

    rect_wigner = [left, bottom, width, height]
    rect_histx = [left, bottom_h, width, 0.2]
    rect_histy = [left_h, bottom, 0.2, height]

    # start with a rectangular Figure
    fig = _plt.figure(figsize=figsize)

    axWigner = _plt.axes(rect_wigner)
    axHistx = _plt.axes(rect_histx)
    axHisty = _plt.axes(rect_histy)

    pcol = axWigner.pcolor(xx, yy, iradon_output, cmap=cmap)
    binwidth = bin_centres[1] - bin_centres[0]
    axHistx.bar(bin_centres, resid2, binwidth)
    axHisty.barh(bin_centres, resid1, binwidth)

    _plt.setp(axHistx.get_xticklabels(), visible=False) # sets x ticks to be invisible while keeping gridlines
    _plt.setp(axHisty.get_yticklabels(), visible=False) # sets x ticks to be invisible while keeping gridlines
    for tick in axHisty.get_xticklabels():
        tick.set_rotation(-90)


    cbaraxes = fig.add_axes(cbar_pos)  # This is the position for the colorbar
    #cbar = _plt.colorbar(axp, cax = cbaraxes)
    cbar = fig.colorbar(pcol, cax = cbaraxes, drawedges=False) #, orientation="horizontal"
    cbar.solids.set_edgecolor("face")
    cbar.solids.set_rasterized(True)
    cbar.ax.set_yticklabels(cbar.ax.yaxis.get_ticklabels(), y=0, rotation=45)
    #cbar.set_label(cbarlabel, labelpad=-25, y=1.05, rotation=0)

    plotlimits = _np.max(_np.abs(bin_centres))
    axWigner.axis((-plotlimits, plotlimits, -plotlimits, plotlimits))
    axHistx.set_xlim(axWigner.get_xlim())
    axHisty.set_ylim(axWigner.get_ylim())

    return fig, axWigner, axHistx, axHisty, cbar