Skip to content

Adding html plot to a post #18

Open
@bluenex

Description

@bluenex

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions