amep.plot#

Visualization#

The AMEP module amep.plot contains methods to visualize and animate simulations, observables, and analysis results. It is based on the Matplotlib Python library. For a detailed customization of plots see also https://matplotlib.org/stable/tutorials/introductory/customizing.html.

Functions

add_colorbar(fig, axis, mappable[, ...])

Add a colorbar to an existing plot.

add_inset(axis, indicator_extent, inset_extent)

Add an inset plot to the existing plot (axis).

amep_plot_defaults()

Shortcut function to set amep plot defaults.

animate_trajectory(trajectory, outfile[, ...])

Create a video from a trajectory.

box(axis, box_boundary, **kwargs)

Adds the simulation box to the given axis.

colored_line(axis, x_vals, y_vals[, cols, ...])

Add a line to the given axis.

create_video(fig, update_frame_func, data, ...)

Create a video from frames generated by a make_frame function.

draw_box(fig, box_extent[, text, edgecolor, ...])

Draws a box.

field(ax, density, X, Y[, cmap, ...])

Visualize a scalar field on a matplotlib axes object.

format_axis(axis[, which, axiscolor, ...])

Format the given axis(axes) of the plot.

linear_mappable(cmap, vmin, vmax[, cscale])

Generate a scalar mappable colormap.

matplotlib_plot_defaults()

Shortcut function to revert to the matplotlib rcparams defaults.

new([figsize, facecolor, nrows, ncols, ...])

Create a new matplotlib.pyplot figure.

particles(ax, coords, box_boundary, radius)

Visualize particles as circles on a matplotlib axes object.

set_locators(axis[, which, major, minor])

Set the locations of major and minor ticks.

style([style_name, mpl_default])

Set the plot style.

to_latex(string)

Replace the mathematical operators with corresponding LaTeX commands.

voronoi(axs, vor, **kwargs)

Plots the Voronoi tessellations from a Voronoi object calculated with scipy function voronoi_plot_2d [1]_.