# spacepy.plot.utils

Utility routines for plotting and related activities

Authors: Jonathan Niehof, Steven Morley, Daniel Welling

Institution: Los Alamos National Laboratory

Contact: jniehof@lanl.gov

Copyright 2012-2014 Los Alamos National Security, LLC.

## Classes

`EventClicker`([ax, n_phases, interval, ...]) | Presents a provided figure (normally a time series) and provides an interface to mark events shown in the plot.

## Functions

`add_logo`(img[, fig, pos, margin]) | Add an image (logo) to one corner of a plot.
`annotate_xaxis`(txt[, ax]) | Write text in-line and to the right of the x-axis tick labels
`applySmartTimeTicks`(ax, time[, dolimit, dolabel]) | 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.
`collapse_vertical`(combine[, others, leave_axis]) | Collapse the vertical spacing between two or more subplots.
`printfig`(fignum[, saveonly, pngonly, clean, ...]) | save current figure to file and call lpr (print).
`set_target`(target[, figsize, loc, polar]) | Given a target on which to plot a figure, determine if that target is None or a matplotlib figure or axes object.
`shared_ylabel`(axes, txt, *args, **kwargs) | Create a ylabel that spans several subplots
`show_used`([fig]) | Show the areas of a figure which are used/occupied by plot elements.
`smartTimeTicks`(time) | Returns major ticks, minor ticks and format for time-based plots
`timestamp`([position, size, draw, strnow, ...]) | print a timestamp on the current plot, vertical lower right
`add_arrows`(lines[, n, size, style, ...]) | Add directional arrows along a plotted line.