-
Notifications
You must be signed in to change notification settings - Fork 27
Support Bokeh 0.9 #2
Comments
Hi, SetupMy python and bokeh versions are Python version : 3.5.1+ (default, Mar 30 2016, 22:46:26)
Bokeh version : 0.11.1 and I installed following packages: > pip freeze
backports.shutil-get-terminal-size==1.0.0
bokeh==0.11.1
decorator==4.0.9
ipython==4.2.0
ipython-genutils==0.1.0
Jinja2==2.8
MarkupSafe==0.23
numpy==1.11.0
pandas==0.18.1
pexpect==4.1.0
pickleshare==0.7.2
pkg-resources==0.0.0
ptyprocess==0.5.1
python-dateutil==2.5.3
pytz==2016.4
PyYAML==3.11
requests==2.10.0
simplegeneric==0.8.1
six==1.10.0
tornado==4.3
traitlets==4.2.1 IssueI used parts of the code you provided in washmap/washmap/water_map.py and tried to generate a colorbar: from bokeh.plotting import show, output_file
from bokeh.models import Plot, Range1d, Text, Rect
COLORS = ["#F1EEF6", "#D4B9DA", "#C994C7", "#DF65B0", "#DD1C77", "#980043"]
PLOT_SIZE = dict(
# plot_width=250,
# plot_height=50
)
xdr = Range1d(0, 250)
ydr = Range1d(0, 50)
plot = Plot(
x_range=xdr,
y_range=ydr,
title="",
min_border=0,
toolbar_location=None,
**PLOT_SIZE
)
for index, color in enumerate(COLORS):
width = 30
rect = Rect(
x=((width * index) + 40), y=40,
width=width, height=10,
fill_color=color, line_color='white'
)
plot.add_glyph(rect)
zero = Text(x=30, y=15, text=['0 %'])
hundred = Text(x=190, y=15, text=['100 %'])
plot.add_glyph(zero)
plot.add_glyph(hundred)
output_file("color_bar.html", title="color bar example")
show(plot) The given code returns following result, which looks good so far. But as soon as I change the PLOT_SIZE = dict(
plot_width=250,
plot_height=50
) only a white page is returned and the JS console says: Am I using the |
I wouldn't expect much of this code to work with the latest version of Bokeh. I've been meaning to do a remake for Pycon (coming up next week). I would start with the bokeh docs and examples. http://bokeh.pydata.org/en/latest/ - http://bokeh.pydata.org/en/latest/docs/gallery.html |
OK, thanks for your quick response! I will look through the official docs. |
This repo only works with bokeh v0.8.2, a number of changes in 0.9 prevent an upgrade:
The text was updated successfully, but these errors were encountered: