hFigure = swplot.plotchem(Name,Value)
swplot.plotchem(Name,Value) plots polyhedra around selected atoms, or
chemical bonds between atoms on an swplot figure.
Name-Value Pair Arguments
- String that selects the type of the plot, one of the following:
'poly'draws polyhedra around the center atoms (default),
'bond'draws bonds between the given atoms.
- Indices of atoms stored in spinw.unit_cell for the center atom of the polyhedra or the first atom of the bonds. Can be also a string that identifies the atoms by their labels.
- Indices or label of the atoms stored in spinw.unit_cell. It determines the vertices of the polyhedra or gives the second atom of a bond.
true, the starting of the bonds or center of polyhedra will be restricted within the given
range, while the surrounding atoms or end of bonds (defined by
atom2) are not restricted. if
extendis set to
false, only those bonds/polyhedra will be plotted that are completely inside the volume defined by the
- Can be a single number, which defines the number vertices of the
'poly') or the number of neighboring atoms (identified by
atom2) that will be connected to
atom1. If can be also a row vector with 2 elements
[dmin dmax]that defines the neighbors of
atom1via a minimum and maxium distance in Å units. Default value is 6 to plot octahedra around
atom1type atoms (when
modeis set to
- Transparency of the plotted surfaces, value between 0 and 1 (1 for opaque, 0 for transparent). Default value is 1 for bonds and 0.3 for polyhedron.
- Color of the objects, one of the following values:
'auto'the color of all objects will be set to the color of
'colorname'all objects will have the same color defined by the string, e.g.
[R G B]all objects will have the same color defined by the RGB code.
'none'no faces will be shown.
- Color of the edges of the polyhedra (unused for bonds), default
'auto'when the edge will have the same color as the faces, see the
'none'will remove the edges.
- Radius of the bond cylinder, default value is 0.03 Å.
These parameters have the same effect on any of the
- spinw object.
- Unit in which the plotting range is defined. It can be one of the
'lu'plot range is defined in lattice units (default),
'xyz'plot range is defined in the Cartesian coordinate system in Å units.
- Defines the plotting range. Depending on the
unitparameter, the given range can be in lattice units or in units of the Cartesian coordinate system. It is either a matrix with dimensions of where the first and second columns define the lower and upper plot limits respectively. It can be alternatively a vector with three elements
[a,b,c]which is equivalent to
[0 a;0 b;0 c]. Default value is
[0 1;0 1;0 1]to show a single cell.
- Handle of the swplot figure. Default value is the active figure handle.
- Whether to show the plot on the legend, default value is
true, the tooltips will be shown when clicking on the plot objects. Default value is
- Column vector with 3 elements, all object positions will be
shifted by the given value in Å units. Default value is
truethe plot will replace the previous plot of the same type. Default value is
true, the plot will be centered, independent of the range. Default value is
true, the swplot figure will be zoomed to make the plot objects cover the full figure. Default is
true, a clone of the spinw object will be saved in the swplot figure data which can be retwrived using
false, the handle of the original spinw object is saved which is linked to the input
objand so it changes when
objis changed. Default value is
- Mesh of the ellipse surface, a triangulation class object or an
integer that used to generate an icosahedron mesh with
number of additional subdivision into triangles. Default value is
swpref.getpref('nmesh'), see also swplot.icomesh.
- Number of vertices on any patch object that is not the icosahedron,
default value is stored in
- Handle of the swplot figure.
The name of the objects is
To find the handles and the corresponding data on these objects, use e.g.
sObject = swplot.findobj(hFigure,’name’,’chem’)`.