plots crystal structure, magnetic structure, anisotropy and couplings [hFigure, handle] = PLOT(obj, 'option1', value1, ...) The function plots the atoms and couplings stored in obj onto a Matlab figure. Optionally a script output can be produced that creates a jMol plot of the crystal structure. Input: obj sw class object. Options: range Plotting range of the lattice parameters in lattice units, dimensions are [3 2]. For example to plot the first unit cell, use: [0 1;0 1;0 1]. Also the number unit cells can be given along the a, b and c directions: [2 1 2], that is equivalent to [0 2;0 1;0 2]. Default is the single unit cell. format Output format string with the following values: 'plot' Plot onto Matlab figure. (Default) 'jmol' Return Jmol script file as a script, (.spt file). Axis & labels ========================================================= legend Whether to plot legend, default is true. pCell Whether to plot unit cell at the origin, defult is true. pMultCell Whether to plot multiple unit cells, default is false. pAxis Whether to plot (a,b,c) axis, default is true. labelAtom Whether to plot labels for atoms, default is true. tooltip Whether to write tooltip information for graphical objects. Default is true. cCell Color of the unit cell, default is black ([0 0 0]). cAxis Color of the (a,b,c) axis, [R G B], default is black ([0 0 0]). lineStyleCell Line style of the unit cell, default is '--'. lineWidthCell Line width of the unit cell, default is 1. dAxis Distance of coordinate system arrows origin from crystal origin in Angstrom, default is [0.5;1.5;2.0]. dText Distance between item and its text label, default is 0.2 Angstrom. fontSize Font size of all text on the plot in pt, default is 12. rAxis Radius of the cylinder of the axis vectors, default is 0.06. angHeadAxis Angle of the axis arrow head, default is 15 deg. lHeadAxis Length of the axis arrow head, default is 0.5 Angstrom. Atom ================================================================== rAtom The default atom radius, default is 0.3 Angstrom. If zero, no atoms are drawn. pNonMagAtom Whether to plot non-magnetic atoms, default is true. rAtomData The source of atomic radius data: false: use rAtom for all atoms (default) true: use radius data from database based on atom label multiplied by rAtom value. cAtom Color of the atoms. Default is 'auto', when all atom gets the color stored in obj.unit_cell. To fix the color of all atoms to a single color, give [R G B] vector as option, containing the RGB code of the color. Magnetic structure ==================================================== pSpin Whether to plot magnetic structure, default is true. cSpin Color of the magnetic moment vectors, default is 'auto' when each spin vector has the color of the magnetic atom it belongs to. sSpin Scaling factor for the lenght of the magnetic moments, default is 1. rSpin Radius of the cylinder of the spins, default is 0.06. angHeadSpin Angle of the spin arrow head, default is 15 deg. lHeadSpin Length of the spin arrow head, default is 0.5 Angstrom. aPlaneSpin Transparency (alpha value) of the circle, representing rotation plane of the moments, default is 0.07. coplanar Decides the limits for plotting the plane of the magnetic moments. 0 No plane is plotted. x Plane of the moment is plotted if the best fitting plane is better than x. Default value is 0. centerS If true, the spin vector is centered on the atom, if false the beggining of the spin vector is on the atom. Default is true. Anisotropy and g-tensor =============================================== sEll Select, whether to plot ellipsoid for anisotropy or g-tensor: 0: no ellipsoid is drawn 1: anisotropy (default) 2: g-tensor. rEll Whether to draw the ellipsoid giving the anisotropy or g-tensor: 0: No ellipsoid is drawn. R: The maximum radius of the ellipsoid. Default value is 1. aEll Transparency (alpha value) of the ellipsoid, default is 0.3. eEll Minimum radius of the principal axes of the ellipse. lwEll Line width of the main circles surrounding the ellipsoid, if zero no circles are drawn. Default is 1. Couplings ============================================================= pCoupling Plot couplings. Default is true. pZeroCoupling Plot couplings with zero value, default is true. sCoupling Select, whether to plot the symmetric part of the exchange as ellipsoid or a vector for the antisymmetric part (DM vector): 0: nothing on the bond 1: DM vector (default) 2: symmetric exchange. eCoupling Minimum radius of the ellipsoid. scaleC The numerical value is used to scale the length of the DM vector or the radius of the ellispoid. Default is 1. cCoupling Color of different couplings. Default is 'auto', when they are set to the color stored in the corresponding obj.matrix. [R G B] will fix the color of all couplings to a uniform one. cDM Color of different DM vectors. Default is 'auto', when they are set to the color stored in the corresponding obj.matrix. [R G B] will fix the color of all DM vectors to a uniform one. rCoupling Radius of the cylinder of the couplings, default is 0.05 Angstrom. aCoupling To plot couplings as arrows from atom1 to atom2 in sw.couplingtable.table. If true arrows are plotted on all bonds. Default is false if no DM interaction present, otherwise true. Other options ========================================================= surfRes Number of points on the surface mesh, default is 30. wSpace Space between figure window and plot structure, default is 10. hg Whether to use hgtransform (nice rotation with the mouse) or default Matlab rotation of 3D objects. Default is true. hFigure Handle of the figure to plot. In not given, the figure window handle is determined automatically. zoom Number of steps to zoom in/out on the figure. Positive number gives zoom in, negative numbers give zoom out. One step equal to the (+/-) button press on the figure toolbar. Default is zero. Output: For plotting: hFigure Handle of the plot figure. handle Stores the handles for all graphical object in a struct. For 'jmol' script file output: strOut A single string is returned, that contains a Jmol script that reproduce the figure as close as possible. The labels on the atom has the following meaning: AtomLabel(idx1)_idx2: idx1 The index of the atom in obj.unit_cell idx2 The index of the atom in obj.atom To access the graphical objects, use the function: handleList = sw_getobject(tagName,fHandle); This command returns all objects with tagName string in their 'Tag' field, in figure with fHandle. List of Tag values: unitCell Unit cell. arrow Arrows of the lattice vectors. arrowText Text of the lattice vectors. atom_ Spheres of the atoms, for example 'atom_Cr' for atoms with the label 'Cr'. aniso_ Anisotropy ellipsoid with atom names, for example 'aniso_Cr', symbolising the anisotropy matrix. atomText_ Label of atoms, for example 'atomText_Cr'. coupling_ Cylinder of couplings, for example 'coupling_J1' for the couplings with label 'J1'. spinPlane Circle showing the plane of the spins. legend Legend. Example: sq = sw_model('squareAF',1); plot(sq); The example plots the structure, couplings and magnetic structure of the square lattice antiferromagnet. See also SW_DRAW, SW_GETOBJECT, SW_ADDOBJECT.