mpas_analysis.shared.plot.plotting.plot_vertical_section¶
-
mpas_analysis.shared.plot.plotting.
plot_vertical_section
(config, xArray, depthArray, fieldArray, colorMapSectionName, suffix='', colorbarLabel=None, title=None, xlabel=None, ylabel=None, fileout='moc.png', figsize=(10, 4), dpi=None, xLim=None, yLim=None, linewidths=2, invertYAxis=True, xArrayIsTime=False, N=None, firstYearXTicks=None, yearStrideXTicks=None, maxXTicks=20, calendar='gregorian')[source]¶ Plots a data set as a x distance (latitude, longitude, or spherical distance) vs depth map (vertical section).
Or, if xArrayIsTime is True, plots data set on a vertical Hovmoller plot (depth vs. time).
Parameters: - config : instance of ConfigParser
the configuration, containing a [plot] section with options that control plotting
- xArray : float array
x array (latitude, longitude, or spherical distance; or, time for a Hovmoller plot)
- depthArray : float array
depth array [m]
- fieldArray : float array
field array to plot
- colorMapSectionName : str
section name in
config
where color map info can be found.- suffix : str, optional
the suffix used for colorbar config options
- title : str, optional
title of plot
- xlabel, ylabel : str, optional
label of x- and y-axis
- fileout : str, optional
the file name to be written
- figsize : tuple of float, optional
size of the figure in inches
- dpi : int, optional
the number of dots per inch of the figure, taken from section
plot
optiondpi
in the config file by default- xLim : float array, optional
x range of plot
- yLim : float array, optional
y range of plot
- linewidths : int, optional
linewidths for contours
- invertYAxis : logical, optional
if True, invert Y axis
- xArrayIsTime : logical, optional
if True, format X axis for time
- N : int, optional
the number of points over which to perform a moving average NOTE: this option is mostly intended for use when xArrayIsTime is True, although it will work with other data as well. Also, the moving average calculation is based on number of points, not actual x axis values, so for best results, the values in the xArray should be equally spaced.
- firstYearXTicks : int, optional
The year of the first tick on the x axis. By default, the first time entry is the first tick.
- yearStrideXTicks : int, optional
The number of years between x ticks. By default, the stride is chosen automatically to have
maxXTicks
tick marks or fewer.- maxXTicks : int, 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. NOTE: maxXTicks is only used if xArrayIsTime is True
- calendar : str, optional
the calendar to use for formatting the time axis NOTE: calendar is only used if xArrayIsTime is True