wulfric.PlotlyEngine.plot_lattice#

method

PlotlyEngine.plot_lattice(cell, color='#000000', range=(1, 1, 1), shift=(0, 0, 0), legend_label=None, legend_group=None, row=1, col=1)[source]#

Plots lattice points spawned by the given cell.

Parameters:
cell(3, 3) array-like

Matrix of a cell, rows are interpreted as vectors.

colorstr, default "#000000"

Color of the points. Any value that is supported by Plotly.

range(3, ) tuple of int, default (1, 1, 1)

How many lattice points to plot. All lattice points with relative coordinates r_1, r_2, r_3, that fulfil

  • -range[0] <= r_1 <= range[0]

  • -range[1] <= r_2 <= range[1]

  • -range[2] <= r_3 <= range[2]

are plotted.

shift(3, ) array-like, default (0, 0, 0)

Absolute coordinates of the corner of the cell, from which the three lattice vectors are plotted.

legend_labelstr, optional

Label for the legend. Entry in legend only showed if legend_label is not None.

legend_groupstr, optional

Legend's group. If None, then defaults to the random string of 10 characters.

rowint, default 1

Row of the subplot.

colint, default 1

Column of the subplot.