def plot(self, *args, **kwargs):
    """ Plot 1-D or 2-D data.
    
    Wraps matplotlib's plot()

    Parameters
    ----------
    *args, **kwargs : passed to matplotlib.pyplot.plot
    legend : True (default) or False
        Display legend for 2-D data.
    ax : matplotlib.Axis, optional
        Provide axis on which to show the plot.

    Returns
    -------
    lines : list of matplotlib's Lines2D instances

    Note
    ----
    You can use to_pandas().plot() combination to use pandas' plot method.

    Examples
    --------
    >>> from dimarray import DimArray
    >>> data = DimArray(np.random.rand(4,3), axes=[np.arange(4), ['a','b','c']], dims=['distance', 'label'])
    >>> data.axes[0].units = 'meters'
    >>> h = data.plot(linewidth=2)
    >>> h = data.T.plot(linestyle='-.')
    >>> h = data.plot(linestyle='-.', legend=False)
    """
    assert self.ndim <= 2, "only support plotting for 1- and 2-D objects"
    return self._plot1D('plot', *args, **kwargs)