abtem.visualize.visualizations#

Module for plotting atoms, images, line scans, and diffraction patterns.

Module Contents#

Classes#

Functions#

convert_complex

discrete_cmap

show_atoms

Display 2D projection of atoms as a matplotlib plot.

API#

class abtem.visualize.visualizations.Visualization(...)[source]#

Initialization

adjust_coordinate_limits_to_artists(...)[source]#
property artists#
property autoscale#
property axes#
axis(...)[source]#
axis_off()[source]#
get_figure()[source]#
property indexing_axes#
interact(...)[source]#
property measurement: BaseMeasurements#
remove_artists()[source]#
set_artists(...)[source]#
set_cbars(...)[source]#
set_cmap(...)[source]#
set_column_titles(...)[source]#
set_common_value_limits(...)[source]#
abstract set_complex_conversion(...)[source]#
set_legend(...)[source]#
set_logscale(...)[source]#
set_power(...)[source]#
set_row_titles(...)[source]#
set_scale_bars(...)[source]#
set_value_limits(...)[source]#
set_xlabel(...)[source]#
set_xlim(...)[source]#
set_ylabel(...)[source]#
set_ylim(...)[source]#
update_data_indices(...)[source]#
abtem.visualize.visualizations.convert_complex(...) BaseMeasurements[source]#
abtem.visualize.visualizations.discrete_cmap(...)[source]#
abtem.visualize.visualizations.show_atoms(...)[source]#

Display 2D projection of atoms as a matplotlib plot.

Parameters:
  • atoms (ase.Atoms) – The atoms to be shown.

  • plane (str, two float) – The projection plane given as a concatenation of ‘x’ ‘y’ and ‘z’, e.g. ‘xy’, or as two floats representing the azimuth and elevation angles of the viewing direction [degrees], e.g. (45, 45).

  • ax (matplotlib.axes.Axes, optional) – If given the plots are added to the axes.

  • scale (float) – Factor scaling their covalent radii for the atom display sizes (default is 0.75).

  • title (str) – Title of the displayed image. Default is None.

  • numbering (bool) – Display the index of the Atoms as a number. Default is False.

  • show_periodic (bool) – If True, show the periodic images of the atoms at the cell boundary.

  • figsize (two int, optional) – The figure size given as width and height in inches, passed to matplotlib.pyplot.figure.

  • legend (bool) – If True, add a legend indicating the color of the atomic species.

  • merge (float) – To speed up plotting large numbers of atoms, those closer than the given value [Å] are merged.

  • tight_limits (bool) – If True the limits of the plot are adjusted

  • kwargs (Keyword arguments for matplotlib.collections.PatchCollection.)

Return type:

matplotlib.figure.Figure, matplotlib.axes.Axes