python - In-app circle-clip image glyphs in bokeh -


how add circle-clipped image glyphs chart, without processing , uploading images manually beforehand? i'm open using other modules.

i want end result chart (from nytimes).

http://imgur.com/a/nv6ta

my current understanding can load images directly urls, not desired outcome. http://bokeh.pydata.org/en/latest/docs/reference/models/glyphs/image_url.html

my current understanding can load images directly urls

this not correct, there imagergba allows sending images raw rgba data, directly embedded in bokeh document. see, e.g., gallery example:

http://bokeh.pydata.org/en/latest/docs/gallery/image_rgba.html

so assuming images python list of 2d numpy arrays of rgba data (pre-cropped) images want display, bokeh show them with:

p.image_rgba(image=images, x=....) 

of course, have convert images rgba arrays yourself, , crop them, things may easier or more ready made use-case tool.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -