cocalc-docker icon indicating copy to clipboard operation
cocalc-docker copied to clipboard

I am testing the recent docker image with datashaders/holoviews w/o success.

Open arm2arm opened this issue 7 years ago • 1 comments

Hello, Are there any chance to get running cocalc with a datashader/holoviews? I am testing the recent docker image with datashaders/holoviews w/o success.

import numpy as np
import pandas as pd
import holoviews as hv
from holoviews.plotting.bokeh.element import (line_properties, fill_properties,
                                              text_properties)
print("""
Line properties: %s\n
Fill properties: %s\n
Text properties: %s
""" % (line_properties, fill_properties, text_properties))

curve_opts = dict(line_width=10, line_color='indianred', line_dash='dotted', line_alpha=0.5)
point_opts = dict(fill_color='#00AA00', fill_alpha=0.5, line_width=1, line_color='black', size=5)
text_opts  = dict(text_align='center', text_baseline='middle', text_color='gray', text_font='Arial')
xs = np.linspace(0, np.pi*4, 100)
data = (xs, np.sin(xs))

(hv.Curve(data).options(**curve_opts) +
 hv.Points(data).options(**point_opts) +
 hv.Text(6, 0, 'Here is some text').options(**text_opts))

on the cocalc it produces: holoview_demo

The result should be something like this: holoview_demo

arm2arm avatar Oct 26 '18 10:10 arm2arm

Did you try this?

from bokeh.plotting import output_notebook
from bokeh.resources import INLINE
output_notebook(resources=INLINE)

I'm having the same problem, but with the cocalc online. These commands above don't solve my problem online, but maybe could solve yours with the docker image.

ll-portes avatar Aug 29 '19 07:08 ll-portes

Closing due to being 5 years old.

williamstein avatar Mar 15 '23 15:03 williamstein