ea42gh
December 18, 2020, 9:50pm
1
I tried the following:
import ipyvolume as ipv
import numpy as np
N = 1000
x, y, z = np.random.normal(0, 1, (3, N))
fig = ipv.figure()
scatter = ipv.scatter(x, y, z)
pn.Row(pn.pane.Pane(ipv.show()), pn.pane.Pane(ipv.show()))
it works, but the plots appear in a column, rather than in a row.
Anybody know how to get the layout to work?
BTW, to get ipyvolume to work with Jupyterlab 2.x.x requires some fiddling:
see https://github.com/maartenbreddels/ipyvolume/issues/324
ea42gh
December 18, 2020, 11:09pm
2
Figured it out: I need to grab fig:
pn.Row(pn.pane.Pane(fig), pn.pane.Pane(fig) )
1 Like
Marc
December 19, 2020, 4:39am
3
I would do something like the below including importing the FontAwesome stylesheet.
import panel as pn
import ipyvolume as ipv
import numpy as np
FONTAWESOME_LINK = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.css"
pn.config.css_files.append(FONTAWESOME_LINK)
N = 1000
x, y, z = np.random.normal(0, 1, (3, N))
fig = ipv.figure()
scatter = ipv.scatter(x, y, z, color="#4464ad")
pn.Column(pn.pane.Markdown("## Panel meets IPyVolume"), pn.panel(fig, margin=50)).servable()
1 Like
ea42gh
December 19, 2020, 5:28pm
4
I added a pythreejs autorotate control and put the result on gitlab at
@Marc what is the advantage of using fontawesome?
1 Like
Marc
December 19, 2020, 6:52pm
5
Hi @ea42gh
Thanks for adding working examples back. That helps build the knowledge of our community.
Before adding the fontawesome fonts the icons like home in the menu of Ipyvolume
where just shown as rectangles because the font was not available.
1 Like