style module
Visualization functions for GNSS data.
- style.close_figures(figs=None)[source]
Closes figures.
If figs is None, then will attempt to close all matplotlib figures with plt.close(‘all’)
- Parameters:
figs (list or matplotlib.pyplot.figure or None) – List of figures or single matplotlib figure object.
- style.get_label(inputs)[source]
Return label/title name from input dictionary.
- Parameters:
inputs (dict) – Dictionary of {row_name : row_value} pairs to create name from.
- Returns:
label – Properly formatted label/title for use in graphs.
- Return type:
string
- style.new_cmap(rgb_color)[source]
Return a new cmap from a color going to white.
Given an RGB color, it creates a new color map that starts at white then fades into the provided RGB color.
- Parameters:
rgb_color (tuple) – color tuple of (red, green, blue) in floats between 0 and 1.0
- Returns:
cmap – New color map made from the provided color.
- Return type:
ListedColormap
Notes
More details and examples at the following link https://matplotlib.org/3.1.0/tutorials/colors/colormap-manipulation.html
- style.save_figure(figures, titles=None, prefix='', fnames=None)[source]
Saves figures to file.
- Parameters:
figures (single or list of matplotlib.pyplot.figure objects) – Figures to be saved.
titles (string, path-like or list of strings) – Titles for all plots.
prefix (string) – File prefix to add to filename.
fnames (single or list of string or path-like) – Path to save figure to. If not None, fname is passed directly to matplotlib’s savefig fname parameter and prefix will be overwritten.
- style.sort_gnss_ids(unsorted_gnss_ids)[source]
Sort constellations by chronological availability.
Order defined by GNSS_ORDER variable in header.
- Parameters:
unsorted_gnss_ids (list or array-like of strings.) – Unsorted constellation names.
- Returns:
sorted_gnss_ids – Sorted constellation names.
- Return type:
list or array-like of strings.