xoa.plot

xoa.plot#

Plotting utilities

Filters are adapted from https://matplotlib.org/stable/gallery/misc/demo_agg_filter.html?highlight=agg%20filter and http://vacumm.github.io/vacumm/library/misc.core_plot.html

Functions

add_compass(ax[, loc, size, style, pad, ...])

Add a compass to a map

add_fancy_map_frame(ax[, width, sides, ...])

Add a black and white alternating frame to a map, like GMT does

add_land(ax[, scale, color])

Add the land to a cartopy axes

add_layer(ax[, name, alpha, zorder, ...])

Add a background layer from a web map service to a cartopy axes

add_scalebar(ax[, length, units, loc, pad, ...])

Add a scale bar to a map

create_base_map(extent[, figsize, ...])

Former names of create_map() and decorate_map()

create_map(extent[, figsize, projection, ...])

Create a decorated cartopy map

decorate_map(ax[, extent, transform, ...])

Decorate a cartopy axes

get_layer([name])

Get the definition of a background layer from the layers options

get_layer_projection([layer])

Get the projection of a map that suits its background layer

import_cartopy()

Import cartopy lazily, with an explicit error message when it is missing

setup_map_axes(ax[, extent, transform, ...])

Decorate a cartopy axes

plot_flow(u, v[, duration, step, particles, ...])

Plot currents as a windy-like plot with random little lagrangian tracks

plot_ts(temp, sal[, dens, ref_dens, pres, ...])

Plot a TS diagram

plot_minimap(obj[, ax, parent, loc, size, ...])

Plot a small map to show the geographic situation of coordinates

plot_double_minimap(obj[, regional_ax])

Plot a global minimap and a regional minimap

get_label(da[, units, pretty])

Get a label like "Long name [units]" for a data array

add_colorbar(mappable[, ax, da])

Add a colorbar that is shrunk and labelled by default

get_map_axes(ax, extent, transform, map_kw)

Create a map when there is no axes, or decorate the axes

plot_field(field[, ax, method, transform, ...])

Plot a field on a map

plot_fields(fields[, ncols, projection, ...])

Plot several fields on maps of a single figure

add_panel_labels(axes, **kwargs)

Label axes with letters or numbers, like "a)"

plot_grid(obj[, ax, kind, stride, ...])

Plot a horizontal grid

plot_section(da[, x, ax, method, title, ...])

Plot a vertical section

plot_stick(u[, v, ax, scale, color, key, ...])

Plot a current time series as sticks

plot_vectors(u, v[, ax, stride, ...])

Plot currents on a map as arrows, under-sampled to stay readable

plot_taylor(obj, ref[, dim, normalize, ...])

Plot a Taylor diagram of arrays against a reference

plot_rose(value[, direction, cartesian, from_])

Plot a wind, wave or current rose

plot_box(lon, lat[, ax])

Plot a box, with the arguments of xoa.geo.get_geosel()

plot_circle(circle[, units, ax])

Plot a circle, with the arguments of xoa.geo.get_geosel()

plot_polygon(polygon[, ax])

Plot a polygon, with the arguments of xoa.geo.get_geosel()

add_agg_filter(objs, filter[, zorder, ax, add])

Add a filtered version of objects to plot

add_shadow(objs[, width, xoffset, yoffset, ...])

Add a drop-shadow to objects

add_glow(objs[, width, zorder, color, ax, ...])

Add a glow effect to text

add_lightshading(objs[, width, fraction, ...])

Add a light shading effect to objects

Classes

PanelLabeler([style, start, loc, pad])

Label the panels of figures with letters or numbers, like "a)"

OffsetFilter([offsets])

GaussianFilter(sigma[, alpha, color])

Gaussian filter

DropShadowFilter(width[, alpha, color, offsets])

Create a drop shadow

GrowFilter(pixels[, color, alpha])

Enlarge the area

LightFilter(sigma[, fraction])

Apply a light filter

FilteredArtistList(artist_list, filter)

A simple container to draw filtered artist.