Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial VegaLite support #56

Merged
merged 1 commit into from
May 7, 2020
Merged

Initial VegaLite support #56

merged 1 commit into from
May 7, 2020

Conversation

pablosanjose
Copy link
Owner

@pablosanjose pablosanjose commented May 5, 2020

If using VegaLite, this adds a method vlplot(b::Bandstructure{1}; kw...) for super-fast, beautiful and interactive plotting of 1D bandstructures in your browser. Can also export as a vector pdf/svg/etc...

Example:

julia> using Quantica, VegaLite

julia> h = LatticePresets.square() |> hamiltonian(hopping(1)) |> unitcell(8);

julia> mesh1D = marchingmesh(range(0,2π,length=81));

julia> b = bandstructure(h, mesh1D, cut = φ -> (φ, -φ))
Step 1/2 - Diagonalising: 100%|█████████| Time: 0:00:00
Bandstructure{1}: collection of 1D bands
  Bands        : 60
  Element type : scalar (Complex{Float64})
  Mesh{1}: mesh of a 1-dimensional manifold
    Vertices   : 81
    Edges      : 80

julia> vlplot(b; points = true)

Screen Shot 2020-05-05 at 21 58 38

PS: VegaLite is amazing

changed defaults and name

fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant