def plot_section(stream, ax=None, cmap='seismic', clip=100, title='', x_interval=1.0, y_interval=1.0):
    '  Plots a seismic section from an obspy stream.\n\n    Parameters\n    ----------\n    stream: Obspy stream object\n        Obspy stream object created from a SU data file\n    ax: Matplotlib Axes object\n        Optional axis object\n    cmap: str\n        Matplotlib colormap option.\n    clip: float\n        Percentage value (0-100) for amplitude clipping\n    title: str\n        plot title\n    x_interval: float\n        Offset axis tick interval in km\n    y_interval: float\n        Time axis tick interval in km\n\n    Raises\n    ------\n    NotImplementedError\n        If stream object does not have SU format\n    '
    if (stream[0].stats._format != 'SU'):
        raise NotImplemented('plot_section currently only supports streams for SU data files.')
    nr = len(stream)
    nt = len(stream[0].data)
    dt = stream[0].stats.delta
    d_aspect = (nr / float(nt))
    data = _convert_to_array(stream)
    fsize = 6
    scale_factor = 1.5
    if (ax is None):
        (fig, ax) = plt.subplots(figsize=(fsize, (scale_factor * fsize)))
    im = ax.imshow(data, aspect=(scale_factor * d_aspect), clim=_cscale(data, clip=clip))
    im.set_cmap(cmap)
    ax.set_title(title)
    ax.set_xlabel('Offset [km]')
    ax.set_ylabel('Time [s]')
    t = _get_time(stream)
    (yticks, ytick_labels) = get_regular_ticks(t, y_interval)
    ax.set_yticks(yticks)
    ax.set_yticklabels(ytick_labels)
    offsets = _get_offsets(stream)
    (xticks, xtick_labels) = get_regular_ticks(offsets, x_interval)
    ax.set_xticks(xticks)
    ax.set_xticklabels(xtick_labels)
    return ax
Plots a seismic section from an obspy stream.

Parameters
----------
stream: Obspy stream object
    Obspy stream object created from a SU data file
ax: Matplotlib Axes object
    Optional axis object
cmap: str
    Matplotlib colormap option.
clip: float
    Percentage value (0-100) for amplitude clipping
title: str
    plot title
x_interval: float
    Offset axis tick interval in km
y_interval: float
    Time axis tick interval in km

Raises
------
NotImplementedError
    If stream object does not have SU format
def plot_section(stream, ax=None, cmap='seismic', clip=100, title=, x_interval=1.0, y_interval=1.0):
    '  Plots a seismic section from an obspy stream.\n\n    Parameters\n    ----------\n    stream: Obspy stream object\n        Obspy stream object created from a SU data file\n    ax: Matplotlib Axes object\n        Optional axis object\n    cmap: str\n        Matplotlib colormap option.\n    clip: float\n        Percentage value (0-100) for amplitude clipping\n    title: str\n        plot title\n    x_interval: float\n        Offset axis tick interval in km\n    y_interval: float\n        Time axis tick interval in km\n\n    Raises\n    ------\n    NotImplementedError\n        If stream object does not have SU format\n    '
    if (stream[0].stats._format != 'SU'):
        raise NotImplemented('plot_section currently only supports streams for SU data files.')
    nr = len(stream)
    nt = len(stream[0].data)
    dt = stream[0].stats.delta
    d_aspect = (nr / float(nt))
    data = _convert_to_array(stream)
    fsize = 6
    scale_factor = 1.5
    if (ax is None):
        (fig, ax) = plt.subplots(figsize=(fsize, (scale_factor * fsize)))
    im = ax.imshow(data, aspect=(scale_factor * d_aspect), clim=_cscale(data, clip=clip))
    im.set_cmap(cmap)
    ax.set_title(title)
    ax.set_xlabel('Offset [km]')
    ax.set_ylabel('Time [s]')
    t = _get_time(stream)
    (yticks, ytick_labels) = get_regular_ticks(t, y_interval)
    ax.set_yticks(yticks)
    ax.set_yticklabels(ytick_labels)
    offsets = _get_offsets(stream)
    (xticks, xtick_labels) = get_regular_ticks(offsets, x_interval)
    ax.set_xticks(xticks)
    ax.set_xticklabels(xtick_labels)
    return ax