def METHOD_NAME(self, fn=None, profile_field=None, profile_weight=None):
    """
    Save the current transfer function to a bitmap, or display
    it inline.
    Parameters
    ----------
    fn: string, optional
        Filename to save the image to. If None, the returns an image
        to an IPython session.
    Returns
    -------
    If fn is None, will return an image to an IPython notebook.
    """
    from matplotlib.backends.backend_agg import FigureCanvasAgg
    from matplotlib.figure import Figure
    if self.tf is None:
        self.build_transfer_function()
        self.setup_default()
    tf = self.tf
    if self.log:
        xfunc = np.logspace
        xmi, xma = np.log10(self.bounds[0]), np.log10(self.bounds[1])
    else:
        xfunc = np.linspace
        xmi, xma = self.bounds
    x = xfunc(xmi, xma, tf.nbins)
    y = tf.funcs[3].y
    w = np.append(x[1:] - x[:-1], x[-1] - x[-2])
    colors = np.array(
        [tf.funcs[0].y, tf.funcs[1].y, tf.funcs[2].y, np.ones_like(x)]
    ).T
    fig = Figure(figsize=[6, 3])
    canvas = FigureCanvasAgg(fig)
    ax = fig.add_axes([0.2, 0.2, 0.75, 0.75])
    ax.bar(
        x,
        tf.funcs[3].y,
        w,
        edgecolor=[0.0, 0.0, 0.0, 0.0],
        log=self.log,
        color=colors,
        bottom=[0],
    )
    if profile_field is not None:
        try:
            prof = self.profiles[self.field]
        except KeyError:
            self.setup_profile(profile_field, profile_weight)
            prof = self.profiles[self.field]
        try:
            prof[profile_field]
        except KeyError:
            prof.add_fields([profile_field])
        xplot = prof.x
        yplot = (
            prof[profile_field] * tf.funcs[3].y.max() / prof[profile_field].max()
        )
        ax.METHOD_NAME(xplot, yplot, color="w", linewidth=3)
        ax.METHOD_NAME(xplot, yplot, color="k")
    ax.set_xscale({True: "log", False: "linear"}[self.log])
    ax.set_xlim(x.min(), x.max())
    ax.set_xlabel(self.ds._get_field_info(self.field).get_label())
    ax.set_ylabel(r"$\mathrm{alpha}$")
    ax.set_ylim(y.max() * 1.0e-3, y.max() * 2)
    if fn is None:
        from IPython.core.display import Image
        f = BytesIO()
        canvas.print_figure(f)
        f.seek(0)
        img = f.read()
        return Image(img)
    else:
        fig.savefig(fn)