Bokeh Quadratic Glyph


In [14]:
from bokeh.plotting import figure, output_file, show
from bokeh.models import Range1d, ColumnDataSource
from bokeh.io import export_png

line_color = 'firebrick'
output_file("../../figures/quadratic.html")
source = ColumnDataSource(dict(
x0 = [0,0,1,1],
y0 = [0,0,1,1],
x1 = [0,1,0,1],
y1 = [0,0,1,1],
cx = [0,0,1,1],
cy = [0,1,0,1]
))
p = figure(plot_width=400, plot_height=400)
p.quadratic(x0='x0',y0='y0',x1='x1',y1='y1', cx='cx',cy='cy', source=source,
         line_alpha=1, line_color=line_color, line_dash='solid', line_width=5)
p.x_range = Range1d(-0.25,1.35, bounds=(-1,2))
p.y_range = Range1d(-0.25,1.35, bounds=(-1,2))
show(p)
export_png(p, filename="../../figures/quadratic.png");


E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name: firebrick; [renderer: GlyphRenderer(id='9be04e8f-00d8-472e-9c7c-a918e578d166', ...)]
E-1001 (BAD_COLUMN_NAME): Glyph refers to nonexistent column name: firebrick; [renderer: GlyphRenderer(id='9be04e8f-00d8-472e-9c7c-a918e578d166', ...)]
WARNING:bokeh.io:The webdriver raised a TimeoutException while waiting for                      a 'bokeh:idle' event to signify that the layout has rendered.                      Something may have gone wrong.