# 5.11.1.1. eqcorrscan.utils.plotting.chunk_data

`eqcorrscan.utils.plotting.``chunk_data`(tr, samp_rate, state='mean')

  Downsample data for plotting.

  Computes the maximum of data within chunks, useful for plotting waveforms or cccsums, large datasets that would otherwise exceed the complexity allowed, and overflow.

  Parameters: | tr (obspy.core.trace.Trace) Trace to be chunked samp_rate (float) Desired sampling rate in Hz state (str) Either ‘Min’, ‘Max’, ‘Mean’ or ‘Maxabs’ to return one of these for the chunks. Maxabs will return the largest (positive or negative) for that chunk.
  Returns: | `obspy.core.trace.Trace`