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

More VegaLite plot directives #110

Merged
merged 2 commits into from
Oct 9, 2020
Merged

More VegaLite plot directives #110

merged 2 commits into from
Oct 9, 2020

Conversation

pablosanjose
Copy link
Owner

In preparation for #103, we add the ability to specify (site-dependent) opacity, size and color of sites and links in VegaLite plots of Hamiltonians. The vlplot keywords are now:

    - `size = 800`: the `(width, height)` of the plot (or `max(width, height)` if a single number)
    - `points = false`: whether to plot points on line plots
    - `labels`: labels for the x and y plot axes. Defaults `("φ/2π", "ε")` and `("x", "y")` respectively
    - `scaling = (1/2π, 1)`: `(scalex, scaley)` scalings for the x (Bloch phase) and y (energy) variables
    - `xlims = missing` and `ylims = missing`: `(xmin, xmax)` and `(ymin, ymax)` to constrain plot range
    - `bands = missing`: bands to plot (or all if `missing`)
    - `axes = (1,2)`: lattice axes to project onto the plot x-y plane
    - `digits = 4`: number of significant digits to show in onsite energy and hopping tooltips
    - `plotsites = true`: whether to plot sites
    - `plotlinks = true`: whether to plot links
    - `sitesize = 15`: diameter of sites in pixels. Can be a function of site index.
    - `siteopacity = 0.9`: opacity of sites. Can be a function of site index.
    - `linksize = 0.25`: thickness of hopping links as a fraction of sitesize. Can be a function of site indices.
    - `linkopacity = 1.0`: opacity of hopping links. Can be a function of site indices.
    - `sitecolor = missing`: function of site index that returns a real to be enconded into a color, using `colorscheme`
    - `linkcolor = sitecolor`: function of link indices that returns a real to be enconded into a color, using `colorscheme`
    - `colorscheme`: Color scheme from `https://vega.github.io/vega/docs/schemes/` to be used (defaults "category10" or "lightgreyred")

automatic legends

colors

switch discrete/continuum colors
@codecov-io
Copy link

codecov-io commented Oct 9, 2020

Codecov Report

Merging #110 into master will decrease coverage by 0.45%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
- Coverage   61.58%   61.13%   -0.46%     
==========================================
  Files          16       16              
  Lines        2705     2725      +20     
==========================================
  Hits         1666     1666              
- Misses       1039     1059      +20     
Impacted Files Coverage Δ
src/plot_vegalite.jl 0.00% <0.00%> (ø)

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 f7ae3a5...f18cf0e. Read the comment docs.

@pablosanjose pablosanjose merged commit 30aa7a9 into master Oct 9, 2020
@pablosanjose pablosanjose deleted the vegalite branch October 14, 2020 09:31
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