pytesmo.time_series.plotting module

Created on Mar 7, 2014

Plot anomalies around climatology using colors

@author: Christoph Paulik christoph.paulik@geo.tuwien.ac.at

pytesmo.time_series.plotting.plot_clim_anom(df, clim=None, axes=None, markersize=0.75, mfc='0.3', mec='0.3', clim_color='0.0', clim_linewidth=0.5, clim_linestyle='-', pos_anom_color='#799ADA', neg_anom_color='#FD8086', anom_linewidth=0.2, add_titles=True)[source]

Takes a pandas DataFrame and calculates the climatology and anomaly and plots them in a nice way for each column

Parameters:
  • df (pandas.DataFrame) –

  • clim (pandas.DataFrame, optional) – if given these climatologies will be used if not given then climatologies will be calculated this DataFrame must have the same number of columns as df and also the column names. each climatology must have doy as index.

  • axes (list of matplotlib.Axes, optional) – list of axes on which each column should be plotted if not given a standard layout is generated

  • markersize (float, optional) – size of the markers for the datapoints

  • mfc (matplotlib color, optional) – markerfacecolor, color of the marker face

  • mec (matplotlib color, optional) – markeredgecolor

  • clim_color (matplotlib color, optional) – color of the climatology

  • clim_linewidth (float, optional) – linewidth of the climatology

  • clim_linestyle (string, optional) – linestyle of the climatology

  • pos_anom_color (matplotlib color, optional) – color of the positive anomaly

  • neg_anom_color (matplotlib color, optional) – color of the negative anomaly

  • anom_linewidth (float, optional) – linewidth of the anomaly lines

  • add_titles (boolean, optional) – if set each subplot will have it’s column name as title Default : True

Returns:

  • Figure (matplotlib.Figure) – if no axes were given

  • axes (list of matploblib.Axes) – if no axes were given