bokeh

Displaying only one tooltip when using the HoverTool() tool

混江龙づ霸主 提交于 2019-11-26 16:56:57
问题 I am plotting very many points in Bokeh, and I have added the HoverTool to the list of tools of the figure, so that the mouse shows the x,y coordinates of the mouse when close to a glyph. When the mouse gets close to a set of glyphs closely packed together, I get as many tooltips as glyphs. I want instead only one tooltip, the one of the closest glyph. This isn't just a presentation detail, because for very many points this results: in slow interaction with the plot, with the browser getting

Data tooltips in Bokeh don't show data, showing '???' instead

雨燕双飞 提交于 2019-11-26 16:47:15
问题 Note from maintainers: this question concerns the obsolete bokeh.charts API that was removed several years ago. See this section for information about hover tools with Bar charts in modern Bokeh: https://docs.bokeh.org/en/latest/docs/user_guide/categorical.html#hover-tools I'm trying to create a stacked bar chart using Bokeh. I'd like to use the hover feature, displaying the relevant data in each part of the bar, but instead of the data Bokeh shows '???'. I got the data in an excel file

How do I work with images in Bokeh (Python)

て烟熏妆下的殇ゞ 提交于 2019-11-26 14:28:04
问题 For example you can plot an image in matplotlib using this code: %matplotlib inline import matplotlib.pyplot as plt import matplotlib.image as mpimg img=mpimg.imread('image.png') plt.imshow(img) Is something like this possible with Bokeh(0.10)? 回答1: You can use the ImageURL glyph ( image_url plot method)to load images locally or from the web. from bokeh.plotting import figure, show, output_file output_file('image.html') p = figure(x_range=(0,1), y_range=(0,1)) p.image_url(url=['tree.png'], x

how to embed standalone bokeh graphs into django templates

你离开我真会死。 提交于 2019-11-26 08:49:25
问题 I want to display graphs offered by the bokeh library in my web application via django framework but I don\'t want to use the bokeh-server executable because it\'s not the good way. so is that possible? if yes how to do that? 回答1: Using the Embedding Bokeh Plots documentation example as suggested by Fabio Pliger, one can do this in Django: in the views.py file, we put: from django.shortcuts import render from bokeh.plotting import figure from bokeh.resources import CDN from bokeh.embed import