@classmethod
def load_image(cls, filename, height=1, array=False, bounds=None, bare=
    False, **kwargs):
    """
        Returns an raster element or raw numpy array from a PNG image
        file, using matplotlib.

        The specified height determines the bounds of the raster
        object in sheet coordinates: by default the height is 1 unit
        with the width scaled appropriately by the image aspect ratio.

        Note that as PNG images are encoded as RGBA, the red component
        maps to the first channel, the green component maps to the
        second component etc. For RGB elements, this mapping is
        trivial but may be important for subclasses e.g. for HSV
        elements.

        Setting bare=True will apply options disabling axis labels
        displaying just the bare image. Any additional keyword
        arguments will be passed to the Image object.
        """
    try:
        from matplotlib import pyplot as plt
    except:
        raise ImportError('RGB.load_image requires matplotlib.')
    data = plt.imread(filename)
    if array:
        return data
    h, w, _ = data.shape
    if bounds is None:
        f = float(height) / h
        xoffset, yoffset = w * f / 2, h * f / 2
        bounds = -xoffset, -yoffset, xoffset, yoffset
    rgb = cls(data, bounds=bounds, **kwargs)
    if bare:
        rgb = rgb(plot=dict(xaxis=None, yaxis=None))
    return rgb
