plot
Functions and attributes

atomman.plot.
interpolate_contour
(system, name, property=None, index=None, magnitude=False, plotxaxis='x', plotyaxis='y', xlim=None, ylim=None, zlim=None, xbins=200, ybins=200, dots=True, czero=True, save=False, show=True, length_unit='angstrom', property_unit=None, cmap='jet') Creates a contour plot of a system’s peratom properties by interpolating properties between atoms.
 Parameters
system (atomman.System) – The system with the peratom property that you want to plot.
name (str) – The name of the peratom property that you want to plot.
property (arraylike object, optional) – Values for the peratom property to plot. If not given, values will be taken as the “name” property of system.
index (int or tuple, optional) – Specifies which component of a multidimensional property to plot. Not needed if the property is scalar.
magnitude (bool, optional) – If True, plots the peratom magnitude of a vector property. Cannot be combined with index. Default value is False.
plotxaxis (str or arraylike object, optional) – Indicates the Cartesian direction associated with the system’s atomic coordinates to align with the plotting xaxis. Values are either 3D unit vectors, or strings ‘x’, ‘y’, or ‘z’ for the Cartesian axes directions. plotxaxis and plotyaxis must be orthogonal. Default value is ‘x’ = [1, 0, 0].
plotyaxis (str or arraylike object, optional) – Indicates the Cartesian direction associated with the system’s atomic coordinates to align with the plotting yaxis. Values are either 3D unit vectors, or strings ‘x’, ‘y’, or ‘z’ for the Cartesian axes directions. plotxaxis and plotyaxis must be orthogonal. Default value is ‘y’ = [0, 1, 0].
xlim (tuple, optional) – The minimum and maximum coordinates along the plotting xaxis to include in the fit. Values are taken in the specified length_unit. If not given, then the limits are set based on min and max atomic coordinates along the plotting axis.
ylim (tuple, optional) – The minimum and maximum coordinates along the plotting yaxis to include in the fit. Values are taken in the specified length_unit. If not given, then the limits are set based on min and max atomic coordinates along the plotting axis.
zlim (tuple, optional) – The minimum and maximum coordinates normal to the plotting axes (i.e. plotxaxis X plotyaxis) to include in the fit. Values are taken in the specified length_unit. If not given, then the limits are set based on min and max atomic coordinates along the axis.
xbins (int, optional) – Specifies the number of interpolation bins to use along the plotting xaxis. Default value is 200.
ybins (int, optional) – Specifies the number of interpolation bins to use along the plotting yaxis. Default value is 200.
dots (bool, optional) – If True, then the positions of the atoms are shown as circles. Default value is True.
czero (bool, optional) – If True, the range of property values will be centered around zero, i.e. cmax = cmin. If False, cmax and cmin will be independently selected using the property values. Default value is True.
save (bool, optional) – If True, the generated plot will be saved to “name.png”. Default value is False.
show (bool, optional) – If True, matplotlib.pyplot.show() is called. Default value is True.
length_unit (str, optional) – The units of length to use for the plotting x and yaxes. Default value is ‘angstrom’.
property_unit (str or None, optional) – The units to use for the property value being plotted. Default value is None, in which no unit conversion is applied.
cmap (str, optional) – The name of the matplotlib colormap to use. Default value is ‘jet’.
 Returns
intsum (float) – The area integrated sum of the property over the plotted region.
avsum (float) – The average property value taken across all plotting bins.