1

I'd like to insert a picture as a background for a Bokeh plot. I converted the 1280 * 800 png file into an RGBA array as suggested here using both image_rgba and image_url solutions, but rendering takes several minutes and the .html output cause my browser to crash.

Here is my code:

import matplotlib.image as mpimg
from bokeh.plotting import figure, show, output_file
output_file('output.html')

img = mpimg.imread('image.png')
p = figure()
p.image_rgba(image=[img], x=[0], y=[799])
show(p)

Does this qualify as a bug or am I missing something here?

Community
  • 1
  • 1
Crolle
  • 822
  • 3
  • 10
  • 20
  • you may want to try `from scipy.misc import imread` rather than using the matplotlib `mpimg`. – Q-man Sep 15 '16 at 03:46

0 Answers0