cjdoris / Bokeh.jl

Interactive plotting made easy
https://cjdoris.github.io/Bokeh.jl
Other
77 stars 3 forks source link

generate demos using DemoCards #6

Closed johnnychen94 closed 2 years ago

johnnychen94 commented 2 years ago

This tries to build something like http://juliaplots.org/AlgebraOfGraphics.jl/dev/gallery/ using DemoCards.

This uses the Literate syntax:

Todo:

cjdoris commented 2 years ago

Looks nice, thanks! Having the examples as literate .jl files is nice.

As commented on #5, generating thumbnails automatically may be difficult. In the meantime, could we make them by hand?

I'm happy with one section for now - obviously it could be split logically as more get added.

johnnychen94 commented 2 years ago

In the meantime, could we make them by hand?

Absolutely, we just need to add a cover entry for each file. It's just that usually people generate them on the fly https://github.com/JuliaPlots/AlgebraOfGraphics.jl/blob/16441cf7a507e189c4936fa6e28bf91a4b235aec/docs/gallery/gallery/basic%20visualizations/lines_and_markers.jl#L44-L46


Another possible solution is to use PythonCall to build some ad-hoc script for documentation purposes, if possible.

cjdoris commented 2 years ago

Going to merge and tweak things. For now I'll just hand-generate the thumbnails. Thanks very much!

johnnychen94 commented 2 years ago

Sorry that I forgot this PR the next day 🙈 and thanks for merging it.

I noticed that CI failed to run on the main branch, which is weird. I was able to build it successfully with a single include("docs/make.jl") when I opened this PR.

cjdoris commented 2 years ago

Yeah same, I introduced a bug in something else I've been doing.

cjdoris commented 2 years ago

https://cjdoris.github.io/Bokeh.jl/dev/gallery/ 🎨

johnnychen94 commented 2 years ago

Ohhh it looks so nice!

May I copy and add your style asset to DemoCards for "listbokeh"?

cjdoris commented 2 years ago

Yeah sure, use that CSS however you like.

RoyiAvital commented 2 years ago

It will be great to a sample code which shows how to use double click for reset (Like clicking the reset button).

A great candidate would be the Bar Chart example as it has no tool top but panning is active. So it makes sense that double click will reset the figure.