mpas_analysis.shared.plot.timeseries_analysis_plot

mpas_analysis.shared.plot.timeseries_analysis_plot(config, dsvalues, N, title, xlabel, ylabel, calendar, lineColors=None, lineStyles=None, markers=None, lineWidths=None, legendText=None, maxPoints=None, titleFontSize=None, figsize=(15, 6), dpi=None, firstYearXTicks=None, yearStrideXTicks=None, maxXTicks=20, obsMean=None, obsUncertainty=None, obsLegend=None, legendLocation='lower left')[source]

Plots the list of time series data sets.

Parameters
configinstance of ConfigParser

the configuration, containing a [plot] section with options that control plotting

dsvalueslist of xarray DataSets

the data set(s) to be plotted

Nint

the numer of time points over which to perform a moving average

titlestr

the title of the plot

xlabel, ylabelstr

axis labels

calendarstr

the calendar to use for formatting the time axis

lineColors, lineStyles, markers, legendTextlist of str, optional

control line color, style, marker, and corresponding legend text. Default is black, solid line with no marker, and no legend.

lineWidthslist of float, optional

control line width. Default is 1.0.

maxPointslist of {None, int}, optional

the approximate maximum number of time points to use in a time series. This can be helpful for reducing the number of symbols plotted if plotting with markers. Otherwise the markers become indistinguishable from each other.

titleFontSizeint, optional

the size of the title font

figsizetuple of float, optional

the size of the figure in inches

dpiint, optional

the number of dots per inch of the figure, taken from section plot option dpi in the config file by default

firstYearXTicksint, optional

The year of the first tick on the x axis. By default, the first time entry is the first tick.

yearStrideXTicksint, optional

The number of years between x ticks. By default, the stride is chosen automatically to have maxXTicks tick marks or fewer.

maxXTicksint, optional

the maximum number of tick marks that will be allowed along the x axis. This may need to be adjusted depending on the figure size and aspect ratio.

obsMean, obsUncertaintylist of float, optional

Mean values and uncertainties for observations to be plotted as error bars. The two lists must have the same number of elements.

obsLegendlist of str, optional

The label in the legend for each element in obsMean (and obsUncertainty)

legendLocationstr, optional

The location of the legend (see pyplot.legend() for details)

Returns
figmatplotlib.figure.Figure

The resulting figure