@classmethod
def from_edges(cls, edges, **kwargs):
    """Generate an axis object from a sequence of bin edges.

        This method should be used to construct an axis where the bin
        edges should lie at specific values (e.g. a histogram).  The
        number of bins will be one less than the number of edges.

        Parameters
        ----------
        edges : `~numpy.ndarray`
            Axis bin edges.
        interp : {'lin', 'log', 'sqrt'}
            Interpolation method used to transform between axis and pixel
            coordinates.  Default: 'lin'.
        """
    if len(edges) < 2:
        raise ValueError('Edges array must have at least two elements.')
    return cls(edges, node_type='edges', **kwargs)
