


plots additional object onto the crystal structure
polyDat = SW_DRAW(Option1, Value1, ...)
It plots extra objects (bonds, polyhedra) onto the crystal structure
plot produced previously by sw.plot() function.
Options:
mode Selects what to plot:
'poly' draws polyhedra around the center atoms.
'bond' draws bonds around the center atoms.
Default is 'poly'.
cAtom Indices of atom types for the center atom
Default is 1. Can be also a string or strings in a cell that
identify atoms by their labels.
pAtom Indices of atom types of the surrounding atoms
Default is 2. Can be also string or cell of strings.
range Plot range in reciprocal lattice units, dimensions are [3 2].
Default is the plotting range of the figure.
limit Can be a single number: gives the number of neighbours or
vector: [min max] distance range from neighbours. Default is 6
to plot octahedra.
edge Whether to paint the edge of the surfaces to the color of
the central atom (true) or keep it black (false). Default is
true.
alpha Transparency of the plotted surfaces. Default is 1 for
non-transparecy.
cBond Color of different bonds. Default is 'auto', when they are set
to the color of the center atom. [R G B] will fix the color of
all bonds to a uniform one.
rBond Radius of the cylinder of the bonds, default is 0.15 Angstrom.
surfRes Number of points on the surface mesh, default is 30.
Output:
polyDat is structure type, with the following fields:
surf Vector, contains the handle of all plotted surfaces.
index Index of the center atom.
pos Positions of the surrounding atoms relative to the center
atom in Angstrom units.
center Positions of the center atoms in the crystal, in Angstrom
units.
For example:
plot(cryst);
sw_draw('mode','bond','cAtom','Cr','pAtom','O','range',6)
It will plot 6 bonds between every chromium atom and the 6 closes oxygen
atoms.
See also SW, SW.PLOT, SW_T2G, SW_ORBITAL, SW_ADDOBJECT.