In [33]:
from chemview.gg import *
from chemview.install import enable_notebook
import numpy as np
enable_notebook()

In [34]:
%matplotlib inline

In [39]:
xyz = np.random.rand(10, 10, 3)
colors = (np.random.rand(10, 10) * 2**32).astype('int')

gg = ggtraj(10, Aes(xyz_traj=xyz, colors=["Cl"] * 10)) + GeomPoints()
gg.display()
#t, mm = gg.display()
#t.attach("fullscreen", mm)


Out[39]:
(<chemview.widget.TrajectoryControls at 0x7fcf404556a0>,
 <chemview.widget.RepresentationViewer at 0x7fcf404556d8>)

In [36]:
xyz = np.random.rand(10, 10, 3)
colors_traj = (np.random.rand(10, 10) * 2**32).astype('int')
#colors = np.arange(10).astype('float')

gg = ggtraj(10, Aes(xyz_traj=xyz, colors_traj=colors_traj)) + GeomPoints() + ScaleColorsGradient(limits=[0, 5], palette="viridis")

t, mm = gg.display()