Skip to content

Latest commit

 

History

History
72 lines (44 loc) · 2.63 KB

README.md

File metadata and controls

72 lines (44 loc) · 2.63 KB

LatPhysPlottingMakie

LatPhysPlottingMakie is a Makie plotting extension for LatticePhysics. It doesn't follow the definitions from LatPhysPlottingPyPlot. Instead this package adds conversions to enable plotting with Makies native functions. Where applicable one can use lines, scatter, etc to plot objects from LatticePhysics. Most objects also have a plot() definition, which may include multiple native plots (for example plot(lattice) include lines and scatter to draw both bonds and sites).

This may require AbstractPlotting#master.

Simple Examples

Here are some example which aim to show off what this package enables. As such the plots are not touched up to be particularly pretty. For this purpose we refer to Makie and MakieLayout which is currently being merged with Makie. We may also include helper functions in the future to do theming of plots. (Some of these already exist in the form of setup_axis!() and VestaTheme())

3D Lattice Plot

You can pass show_axis = false to hide the axis.

uc = getUnitcellFCC()
l = getLatticeOpen(uc, 4)
plot(l, site_color = :blue)

2D Lattice Plot

uc = getUnitcellKagome()
l = getLatticeOpen(uc, 4)
plot(l)

Reciprocal Path + Brillouin zone

uc = getUnitcellHoneycomb()
bz = getBrillouinZone(uc)
p = getReciprocalPath(uc, :Gamma, :K, :M, :Gamma)
scene = plot(bz)
plot!(scene, p, color=:red)

Bandstructure

Bandstructure plots currently use a scatter plot to be maximally adjustable. If you supply the band structure as a Node you should be able to adjust the resolution and even the unit cell without any problems.

uc = getUnitcellHoneycomb()
bs = getBandstructure(uc, p)
plot(bs)

Bandstructure GUI

This combines a plot of the reciprocal path and the brilluoin zone with a plot of the bandstructure and a bunch of sliders to adjust hopping parameters of the given unitcell.

uc = getUnitcellKagome()
BandstructureGUI(uc)