This one wraps BokehJS, which is the JavaScript component of the python Bokeh package (though it doesn’t actually call Python). It can render plots in a notebook or straight to your browser.
You can make interactive plots, add widgets and build up complex layouts. Interaction with a backing server is not implemented (yet).
TTFP is about 5 seconds on my machine, which somehow beats UnicodePlots (7 seconds).
What’s neat is that it is mostly automagically generated from the Python package, which means it supports all the same models, has all the same parameters and defaults, and has loads of documentation that I didn’t have to write.
Bokeh.jl is the closest thing to MATLAB’s experience I have seen so far.
It can handle large data set while maintaining interactivity. Still not as fast as MATLAB but I haven’t seen anything else in Julia that can do this:
using Bokeh;
Bokeh.settings!(use_browser = true);
hF = figure(tooltips = [("x", "\$x"), ("y", "\$y")]); #<! The tooltips allow hovering over data to see its values
numPts = 1_000_000;
plot!(hF, Scatter, x = randn(numPts), y = randn(numPts));
display(hF); #<! Opens in a browser
The same system is used to ensure the named colours, colour palettes, and some other pieces of information are consistent with the Python version. All the other functionality is still written in Julia.
Is it possible to export a figure to a standalone .html file? I’ve tried the following, but it 1. asks me to confirm ingoing/outgoing connections each time, and the resulting .html files are not properly formatted.
using Bokeh, BokehBlink, Blink
# Bokeh.settings!(display=:browser) # Tried with and without
x = [1, 2, 3, 4]
y = sin.(x)
p = Bokeh.figure()
Bokeh.plot!(p, Bokeh.Line, x=x, y=y)
BokehBlink.save("testplot.html", p, format="webp")
Yep the latter way is the right way, but you shouldn’t need to add any extra scripts, Bokeh.doc_standalone_html(doc) should already be a self-contained document. If that’s not working for you, please post an issue on the GitHub repo.