@language python
import holoviews as hv
hv.extension('bokeh')
xs = range(-10,11)
ys = [100-el**2 for el in xs]
curve = hv.Curve((xs, ys))
curve.opts(width=350, height=300)
hv.save(curve, 'curve.html')
@language rest
Here is the resulting interactive graph:
.. raw:: html
:file: curve.html@language rst
Here is the resulting interactive graph:
@image curve.htmlThomas Passin and I have been discussing his vr3 plugin in private. This is a great plugin. Our conversation deserves to be public.Here I am going to discuss what I think I know about vr3 and its relationship with the holoviews and bokeh packages. I'll keep this as short as possible.vr3: the big picturevr3 allows you to interleave python code with rst, such that both parts are shown in the vr3 pane. This is a great feature. For example, given the following in the body pane:@language python
import holoviews as hv
hv.extension('bokeh')
xs = range(-10,11)
ys = [100-el**2 for el in xs]
curve = hv.Curve((xs, ys))
curve.opts(width=350, height=300)
hv.save(curve, 'curve.html')
@language rest
Here is the resulting interactive graph:
.. raw:: html
:file: curve.htmlYou will see something like the attached file in the vr3 pane.I wonder, though, whether some of the rST code is necessary. Thomas, wouldn't it be simpler (for users) for vr3 to support something like:@language rst
Here is the resulting interactive graph:
@image curve.html
Not in this
case, because the output is interactive javascript code, not just an
image file. Matplotlib will produce an image file, and then you could
probably do it that way.
Also, for there to be an @image directive, we'd have to think it through carefully to understand what should happen if someone put one into the middle of a code block. In principle, it would be a good thing to have a language-agnostic directive like this that you could use the same way with both MD and RsT, so the idea is attractive from that point of view.
Thomas Passin and I have been discussing his vr3 plugin in private. This is a great plugin. Our conversation deserves to be public.
Holoview and bokehHoloviews and bokeh are both important projects. It's reasonable to use both.For vr3, using holoviews might be the better starting point, as shown above. However, I personally am more more interested in the bokeh client server architecture as it relates to Jupyter. I'm not sure how this architecture relates to vr3.
[snip]
And it turns out that it's just as easy to work with Seaborn,
On Monday, March 30, 2020 at 6:48:29 AM UTC-4, Edward K. Ream wrote:
[snip]
I wonder, though, whether some of the rST code is necessary. Thomas, wouldn't it be simpler (for users) for vr3 to support something like:@language rst
Here is the resulting interactive graph:
@image curve.htmlNot in this case, because the output is interactive javascript code, not just an image file. Matplotlib will produce an image file, and then you could probably do it that way.Also, for there to be an @image directive, we'd have to think it through carefully to understand what should happen if someone put one into the middle of a code block. In principle, it would be a good thing to have a language-agnostic directive like this that you could use the same way with both MD and RsT, so the idea is attractive from that point of view.
This looks really cool! I was asking for a inspiring screenshot in other thread, unknowing that I would find them here.
Thanks a lot,
Offray
And it turns out that it's just as easy to work with Seaborn,
On Monday, March 30, 2020 at 6:48:29 AM UTC-4, Edward K. Ream wrote:
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/b3d7a8a2-2d53-4b8e-ac47-a09539dacc0a%40googlegroups.com.