satplottools

Plotting functions originally created for plotting in-situ sensed data from low-earth-orbit spacecraft (Defense Meterology Satellite Program).

Warning

This is one of the oldest parts of geospacepy-lite. There is a lot of technical debt surrounding this code. It does not use matplotlib’s projection=polar to make polar plots. It manually makes polar plots on a standard matplotlib axes.

geospacepy.satplottools.draw_dialplot(ax, minlat=50, padding=3, fslt=10, fslat=12, southern_hemi=False, draw_circles=True, latlabels=True)[source]

Draws the dialplot and labels the latitudes

ax : matplotlib.axes.Axes
Axes object to plot on
minlat : {60,50,40}, optional
Latitude of largest ring of dialplot
padding : int, optional
Amount of extra space to put around the plot ( in plot units )
fslt : int,optional
Font size for hour labels
fslat : int,optional
Font size for latitude labels
southern_hemi : bool,optional
Defaults to False, put negative signs on latitude labels
draw_circles : bool,optional
Draw the circles at the labeled latitudes (default: True)
latlabels : bool,optional
Draw latitude labels on plot (default: True)
geospacepy.satplottools.latlt2cart(lat, lt, hemisphere)[source]

Latitude and local time to cartesian for a top-down dialplot

geospacepy.satplottools.latlon2cart(lat, lon, hemisphere)[source]

Latitude and longitude to cartesian for a top-down dialplot

geospacepy.satplottools.multiline_timelabels(ax, tdata, xdata, strffmt='%H:%M', xfmt=['%.1f'])[source]

Adds additional lines to the labels of an existing axes.

tdata : numpy.ndarray
data that was passed to the plot function, must be an array of datetime objects
xdata : numpy.ndarray
any number of columns of additional data to be added to labels. Must have same number of rows as tdata.
strffmt : str
format specification to datetime.datetime.strftime for time labels
xfmt : list
list of formats for each column of xdata
geospacepy.satplottools.polarbinplot(ax, bin_edges, bin_values, hemisphere='N', lonorlt='lt', **kwargs)[source]
Plots a collection of bins in polar coordinates on a dialplot
bin_edges : numpy.ndarray
Must have shape [n x 4] with columns: bin_lat_start,bin_lat_end,bin_lonlt_start,bin_lonlt_end
lonorlt : ‘lon’ or ‘lt’
Use longitude or localtime as azimuthal coordinate
Returns:mappable – The collection of bin shapes (which can be fed to colorbar)
Return type:matplotlib.collections.PatchCollection