plot - Plot, various specialized plotting functions and associated utilities¶
plot: SpacePy plotting routines
This package aims to make getting publication ready plots easier. It provides classes and functions for different types of plot (e.g. Spectrogram, levelPlot), for helping make plots more cleanly (e.g. set_target, dual_half_circle), and for making plots convey information more cleanly, with less effort (e.g. applySmartTimeTicks, style).
This plot module now provides style sheets. For most standard plotting we recommend the default style sheet (aka spacepy). To apply the default plot style, use the following:
import spacepy.plot as splot
splot.style()
Changed in version 0.5.0: Plot styles are no longer applied automatically.
Different plot types may not work well with this style, so we have provided alternatives. For polar plots, spectrograms, or anything with larger blocks of color, it may be better to use one of the alternatives:
import spacepy.plot as splot
splot.style('altgrid') # inverts background from default so it's white
splot.style('polar') # designed for filled polar plots
splot.revert_style() # put the style back to matplotlib defaults
Authors: Brian Larsen and Steve Morley Institution: Los Alamos National Laboratory Contact: balarsen@lanl.gov
Copyright 2011-2016 Los Alamos National Security, LLC.
|
Add an image (logo) to one corner of a plot. |
|
Write text in-line and to the right of the x-axis tick labels |
|
Given an axis ax and a list/array of datetime objects, time, use the smartTimeTicks function to build smart time ticks and then immediately apply them to the given axis. |
|
List the available plot styles provided by spacepy.plot |
|
Collapse the vertical spacing between two or more subplots. |
|
Plot two half circles to a plot with the specified face colors and rotation. |
|
Draw a step-plot with up to 5 levels following a color cycle (e.g. |
|
Convenience wrapper for matplotlib's plot function |
Revert plot style settings to those in use prior to importing spacepy.plot |
|
|
Given a target on which to plot a figure, determine if that target is None or a matplotlib figure or axes object. |
|
Create a ylabel that spans several subplots |
|
Plots a 1-D time series as a Carrington or Bartels plot |
|
This class rebins data to produce a 2D data map that can be plotted as a spectrogram |
|
Apply SpacePy's matplotlib style settings from a known style sheet. |
|
print a timestamp on the current plot, vertical lower right |
|
Add directional arrows along a plotted line. |
Most of the functionality in the plot module is made available directly through the plot namespace. However, the plot module does contain several submodules listed below
Module for plotting data by Carrington or Bartels rotation |
|
Create and plot generic 'spectrograms' for space science. |
|
Utility routines for plotting and related activities |