lstid_processing.plot_rout

Functions that support diagnostic plotting.

Functions

close_figures(figs)

Close a list of figures, freeing up memory

nrl_colors(num)

Determine color codes for NRL in a standard order

get_marker(num[, small, line])

Select a matplotlib standard plotting marker in a specified order.

add_colorbar(figure_handle, contour_handle, zmin, zmax)

Create a colorbar and add it to a figure.

add_magnetic_equator(ax[, meq_file, line_style, ...])

Add a line showing the location of the magnetic equator.

Module Contents

lstid_processing.plot_rout.close_figures(figs)[source]

Close a list of figures, freeing up memory

Parameters:
figslist-like

List of figure handles

lstid_processing.plot_rout.nrl_colors(num)[source]

Determine color codes for NRL in a standard order

Parameters:
numint

Index number, will cycle to select an index between 0 and 10

Returns:
colorstr

HEX string or named color (for unofficial colors)

lstid_processing.plot_rout.get_marker(num, small=False, line=None)[source]

Select a matplotlib standard plotting marker in a specified order.

Parameters:
numint

Index number, starting at zero

smallbool

Use the small markers (default=False)

linebool or NoneType

Replace marker with line (True), add marker to line (False), or do not include any line (None) (default=None)

Returns:
markerstr

String denoting a marker to be used in matplotlib formatting

lstid_processing.plot_rout.add_colorbar(figure_handle, contour_handle, zmin, zmax, zinc=6, name=None, units=None, orient='vertical', scale='linear', width=1, loc=[0.9, 0.1, 0.03, 0.8], overflow='neither', ticks=None, ax=None, pad=0.05)[source]

Create a colorbar and add it to a figure.

Parameters:
figure_handlematplotlib.figure.Figure

handle to the figure

contour_handlematplotlib.collections.PathCollection

handle to the plotted contour collection

zminfloat

minimum z value

zmaxfloat

maximum z value

zincint

z tick incriment (default=6)

namestr or NoneType

z variable name (default=None)

unitsstr or NoneType

z variable units (default=None)

orientstr

bar orientation, see mpl.colorbar (default=’vertical’)

scalestr

Tick scaling type, one of ‘default’, ‘linear’, ‘datetime’, ‘scientific’, ‘log’, or ‘exponential’ (default=’linear’)

widthfloat

fraction of width (0-1), (default=1)

loclist-like

location of colorbar in figure coordinates, see also mpl.colorbar (default=[0.95, 0.1, 0.03, 0.8])

overflowstr

include triangles showing overflow colors? Options include ‘neither’, ‘both’, more? (default=”neither”)

tickslist-like or NoneType

List of custom tick values, only used if value is not None (default=None)

axmatplotlib.axes._subplots.AxesSubplot or NoneType

Axis to which the colorbar will be attached or None to create a unique axis for the colorbar (default=None)

padfloat

If ax is not None, fraction of the original Axes between the colorbar and new image Axes (default=0.05)

Returns:
ax2matplotlib.axes._subplots.AxesSubplot

Handle to the colorbar axis

cbmatplotlib.colorbar.Colorbar

Handle to the colorbar

lstid_processing.plot_rout.add_magnetic_equator(ax, meq_file=None, line_style='-', line_width=2, line_color='k')[source]

Add a line showing the location of the magnetic equator.

Parameters:
axmatplotlib.axes._subplots.AxesSubplot

Subplot handle

meq_filestr or NoneType

Name of file containing location of magnetic equator with longitude in the first column and latitude in the second, or None to use local file (default=None)

line_stylestr

Line style to use (default=’-‘)

line_widthint

Line width to plot (default=2)

line_colorstr

Line color to plot, may use named colors (default=’k’)

Raises:
IOError

If unable to find or open provided filename