wulfric.PlotlyEngine.plot_atoms#
method
- PlotlyEngine.plot_atoms(cell, atoms, colors=None, legend_label=None, legend_group=None, shift=(0, 0, 0), scale=1, row=1, col=1)[source]#
Plots a set of atoms.
- Parameters:
- cell(3, 3) array-like
Matrix of a cell, rows are interpreted as vectors.
- atomsdict
Dictionary with N atoms. Expected keys:
"positions" : (N, 3) array-like
Positions of the atoms in the basis of lattice vectors (
cell). In other words - relative coordinates of atoms."names" : (N, ) list of str, optional See Notes
"species" : (N, ) list of str, optional See Notes
- colorsstr or list of str, optional
Color of the atoms. Any value that is supported by Plotly. If
None, then color is deduced based on atoms's species.- legend_labelstr, optional
Label of the line that is displayed in the figure.
- legend_groupstr, optional
Legend's group. If
None, then defaults to the random string of 10 characters.- scalefloat, default 1
Scale for the size of atoms's markers and text labels. Use
scale>1to increase the size.- rowint, default 1
Row of the subplot.
- colint, default 1
Column of the subplot.
Notes
atoms["names"]is used to deduce atom's species if necessary viawulfric.crystal.get_atom_species().atoms["species"] is used to define atom's colors if ``colors is None