hFigure = swplot.plotbase(Name,Value)


swplot.plotbase(Name,Value) plots the three basis vectors that define the coordinate system of the plot, either the lattice vectors, Descartes coodinate system or the reciprocal lattice vectors.

Name-Value Pair Arguments

String that determines the type of basis vectors to plot. Possible values are:
  • abc plots the lattice vectors (default),
  • hkl plots the reciprocal lattice vectors,
  • xyz plots the Descartes coordinate system.
Determines the length of the 3 basis vectors. If 0, the length won’t be rescaled. If non-zero, the length parameter determines the length of the plotted vectors in Å. Default value is 2 Å.
Logical variable, plots the vector labels if true. Default value is true.
Color of the arrows, either a cell of three color name strings or a matrix with dimensions of where each column defines the RGB values of a color. Default value is {'red' 'green' 'blue'}.
Radius of the arrow body, default value is 0.06 Å.
Head angle of the arrow in degree units, default value is 30°.
Length of the arrow head, default value is 0.5 Å.
Distance from origin in units, default value is [1 1 1].

'dtext' : Distance of the label from the arrow in xyz units, default value is 0.5 Å.

General paraters

These parameters have the same effect on any of the swplot.plot... functions.

spinw object.
Handle of the swplot figure. Default value is the active figure handle.
If true, the tooltips will be shown when clicking on the plot objects. Default value is true.
Column vector with 3 elements, all object positions will be shifted by the given value in Å units. Default value is [0;0;0].
If true the plot will replace the previous plot of the same type. Default value is true.
If true, the plot will be centered, independent of the range. Default value is false.
If true, the swplot figure will be zoomed to make the plot objects cover the full figure. Default is true.
If true, a clone of the spinw object will be saved in the swplot figure data which can be retwrived using swplot.getdata('obj'). If false, the handle of the original spinw object is saved which is linked to the input obj and so it changes when obj is changed. Default value is false.
Number of vertices on any patch object that is not the icosahedron, default value is stored in swpref.getpref('npatch').