pyrad.graph.plot_timeseries#

pyrad.graph.plot_timeseries(tvec, data_list, fname_list, labelx='Time [UTC]', labely='Value', labels=None, title='Time Series', period=0, timeformat=None, colors=None, linestyles=None, markers=None, ymin=None, ymax=None, dpi=72)[source]#

Plot one or multiple time series.

Behavior#

  • Legacy: if data_list is a list of 1D arrays (one per series), plot them.

  • Multi-timeseries: if data_list is a list of lists/tuples, each inner list represents a “group” (e.g., multiple radars) and all series in the group are plotted as lines. If labels is None, defaults to RADAR001, RADAR002, …

    Examples:

    data_list = [series1, series2] -> 2 lines (legacy) data_list = [[r1, r2, r3]] -> 3 lines data_list = [[r1, r2], [r1b, r2b]] -> 4 lines (all plotted)

Parameters:
  • tvec (array-like of datetime) – Time vector.

  • data_list (list) – List of series (legacy) OR list of lists of series (multi-timeseries).

  • fname_list (list of str) – Output filenames.

  • labels (list of str or None) – Legend labels (one per plotted line). If None and multi-timeseries is detected, defaults to RADAR001, RADAR002, … up to number of lines. If None in legacy mode, no legend is shown.

  • period (float) – Measurement period in seconds used to compute accumulation. If 0 no accumulation is computed.

  • timeformat (str, optional) – Datetime formatter string for x-axis.

  • colors, linestyles, markers (list, optional) – Styling per plotted line (length must match number of plotted lines), or None to use matplotlib defaults.

  • ymin, ymax (float, optional) – Y-axis limits.

  • dpi (int) – Figure DPI.

returns:

fname_list (list of str) – Output filenames.