import sys import requests from numpy import pi, arange, sin, cos from bokeh.objects import ( Plot, DataRange1d, LinearAxis, Grid, ColumnDataSource, Glyph, PanTool, WheelZoomTool) from bokeh.glyphs import Circle from bokeh import session from bokeh import document document = document.Document() session = session.Session() session.use_doc('glyph2_server') session.load_document(document) x = arange(-2*pi, 2*pi, 0.1) y = sin(x) r = (cos(x)+1) * 6 + 6 source = ColumnDataSource( data=dict( x=x, y=y, r=r, ) )
import sys import requests import numpy as np from bokeh.glyphs import * from bokeh.objects import ( Plot, Range1d, LinearAxis, Grid, Glyph, ColumnDataSource, PanTool, WheelZoomTool ) from bokeh import session from bokeh import document document = document.Document() session = session.Session() session.use_doc('prim_server') session.load_document(document) x = np.arange(1,6) y = np.arange(5, 0, -1) source = ColumnDataSource(data=dict(x=x,y=y)) xdr = Range1d(start=0, end=10) ydr = Range1d(start=0, end=10) def make_plot(name, glyph): glyph_renderer = Glyph( data_source = source, xdata_range = xdr,
import time import requests from numpy import pi, sin, cos import numpy as np from bokeh.objects import (Plot, DataRange1d, LinearAxis, ColumnDataSource, Glyph, PanTool, WheelZoomTool) from bokeh.glyphs import Line from bokeh import session from bokeh import document document = document.Document() session = session.Session() session.use_doc('line_animate') session.load_document(document) x = np.linspace(-2 * pi, 2 * pi, 1000) x_static = np.linspace(-2 * pi, 2 * pi, 1000) y = sin(x) z = cos(x) source = ColumnDataSource(data=dict(x=x, y=y, z=z, x_static=x_static)) xdr = DataRange1d(sources=[source.columns("x")]) xdr_static = DataRange1d(sources=[source.columns("x_static")]) ydr = DataRange1d(sources=[source.columns("y")]) line_glyph = Line(x="x", y="y", line_color="blue") line_glyph2 = Line(x="x", y="z", line_color="red")
import time import requests from numpy import pi, sin, cos import numpy as np from bokeh.objects import (Plot, DataRange1d, LinearAxis, ColumnDataSource, Glyph, PanTool, WheelZoomTool) from bokeh.glyphs import Line from bokeh import session from bokeh import document document = document.Document() session = session.Session() session.use_doc('line_animate') session.load_document(document) x = np.linspace(-2*pi, 2*pi, 1000) x_static = np.linspace(-2*pi, 2*pi, 1000) y = sin(x) z = cos(x) source = ColumnDataSource( data=dict( x=x, y=y, z=z, x_static=x_static) ) xdr = DataRange1d(sources=[source.columns("x")]) xdr_static = DataRange1d(sources=[source.columns("x_static")])
from __future__ import print_function from numpy import pi, arange, sin, cos from bokeh.browserlib import view from bokeh.document import Document from bokeh.glyphs import Circle from bokeh.objects import ( Plot, DataRange1d, LinearAxis, Grid, ColumnDataSource, Glyph, PanTool, WheelZoomTool ) from bokeh import session document = Document() session = session.Session() session.use_doc('glyph2_server') session.load_document(document) x = arange(-2*pi, 2*pi, 0.1) y = sin(x) r = (cos(x)+1) * 6 + 6 source = ColumnDataSource(data=dict(x=x, y=y, r=r)) xdr = DataRange1d(sources=[source.columns("x")]) ydr = DataRange1d(sources=[source.columns("y")]) plot = Plot(x_range=xdr, y_range=ydr, min_border=80) circle = Circle( x="x", y="y", size="r",
from __future__ import print_function import sys import requests from numpy import pi, arange, sin, cos from bokeh.objects import Plot, DataRange1d, LinearAxis, Grid, ColumnDataSource, Glyph, PanTool, WheelZoomTool from bokeh.glyphs import Circle from bokeh import session from bokeh import document document = document.Document() session = session.Session() session.use_doc("glyph2_server") session.load_document(document) x = arange(-2 * pi, 2 * pi, 0.1) y = sin(x) r = (cos(x) + 1) * 6 + 6 source = ColumnDataSource(data=dict(x=x, y=y, r=r)) xdr = DataRange1d(sources=[source.columns("x")]) ydr = DataRange1d(sources=[source.columns("y")]) circle = Circle(x="x", y="y", fill_color="red", radius={"field": "r", "units": "screen"}, line_color="black") glyph_renderer = Glyph(data_source=source, xdata_range=xdr, ydata_range=ydr, glyph=circle)
from __future__ import print_function import sys import requests import numpy as np from bokeh.glyphs import * from bokeh.objects import (Plot, Range1d, LinearAxis, Grid, Glyph, ColumnDataSource, PanTool, WheelZoomTool) from bokeh import session from bokeh import document document = document.Document() session = session.Session() session.use_doc('prim_server') session.load_document(document) x = np.arange(1, 6) y = np.arange(5, 0, -1) source = ColumnDataSource(data=dict(x=x, y=y)) xdr = Range1d(start=0, end=10) ydr = Range1d(start=0, end=10) def make_plot(name, glyph): glyph_renderer = Glyph( data_source=source, xdata_range=xdr,