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

Adding html plot to a post #18

Open
bluenex opened this issue Apr 16, 2018 · 0 comments
Open

Adding html plot to a post #18

bluenex opened this issue Apr 16, 2018 · 0 comments

Comments

@bluenex
Copy link
Member

bluenex commented Apr 16, 2018

How to add interactive lightning-viz plot to a post

Get html and js of a plot

Because a single html file for a plot is pretty big (1.5-2 MB) we will separate it into html and js.

From tuple_code:

js = viz.load_embed()
base = viz._html

What we need to do more with js and base from snippet above:

After you run the last cell of manee ipynb in tuplecode, you get plot.html and plot.js.

Copy html of plot

Then copy plot.html to _plots folder inside _posts in tupleblog.

Include plot into a post

Use include_relative for this:

<center>{% include_relative _plots/example_plot.html %}</center>
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

No branches or pull requests

1 participant