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

Plots of Hamiltonians with VegaLite #57

Merged
merged 1 commit into from
May 11, 2020
Merged

Plots of Hamiltonians with VegaLite #57

merged 1 commit into from
May 11, 2020

Conversation

pablosanjose
Copy link
Owner

... with tooltips, and pan/zoom!

Example

julia> using Quantica, VegaLite

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

julia> vlplot(h)

Screen Shot 2020-05-10 at 01 26 59

@codecov-io
Copy link

codecov-io commented May 10, 2020

Codecov Report

Merging #57 into master will decrease coverage by 1.28%.
The diff coverage is 0.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   57.37%   56.09%   -1.29%     
==========================================
  Files          15       15              
  Lines        2196     2348     +152     
==========================================
+ Hits         1260     1317      +57     
- Misses        936     1031      +95     
Impacted Files Coverage Δ
src/hamiltonian.jl 67.56% <0.00%> (-1.50%) ⬇️
src/plot_makie.jl 0.00% <0.00%> (ø)
src/plot_vegalite.jl 0.00% <0.00%> (ø)
src/tools.jl 61.70% <0.00%> (-6.14%) ⬇️
src/lattice.jl 65.97% <16.66%> (+0.30%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d41009b...b1c33f7. Read the comment docs.

@pablosanjose
Copy link
Owner Author

pablosanjose commented May 10, 2020

Current limitations are:

  • VegaLite plots are strictly 2D. 3D lattices are projected onto a couples of axes. If true 3D is needed, use Makie.
  • z-ordering for hopping/site occlusion in projected 3D is not implemented yet.
  • Tooltips of matrix-blocks are displayed in a single line
  • VegaLite chokes on large systems currently (10^5 sites or so). Use Makie for those

optimizations

cleaner tooltips

rfc function names

plot -> makieplot

Revert "plot -> makieplot"

This reverts commit aed71f7.

fix dimensionality

cleanup
@pablosanjose
Copy link
Owner Author

The test failure seems to be unrelated to the PR

@pablosanjose pablosanjose deleted the vegalite branch May 11, 2020 11:14
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.

2 participants