Comments (9)
hey @ethen8181, yea of course I love getting requests on here. I'm looking forward to doing more Bokeh tutorials but kinda waiting for the 1.0 release because so much of the API is changing and a lot of the code will have to be rewritten. Even the 0.12.5 to 0.12.6 release deprecated something I wrote in the Flask tutorial.
What would you like to see as far as Flask+Flask_bootstrap posts? Setting up and using it? Good practices for using a bootstrap-type library?
from fullstackpython.com.
Good to know! I am looking for a how to embed multiple Bokeh plots in Flask (using flask_bootstrap) post, not so much on the how to set up flask or use flask_bootstrap.
I had a go at it by modifying your tutorial, and managed to get 1 Bokeh plot on there, but failed to get multiple bokeh plots to work. So thought you might had experience doing related things.
from fullstackpython.com.
hmm I don't have time to check this out myself right now but did you double the line script, div = components(plot)
so it was separated into unique variables for the script and div for 2 separate plots? did it just not display or give a certain error message?
from fullstackpython.com.
Yeah, so I tried the following:
# p1 is a single plot, and this renders fine
plot_script, plot_div = components(p1)
# but when I tried to add multiple plots it just gives me a blank screen
# 1. gridplot doesn't work
# https://bokeh.pydata.org/en/latest/docs/user_guide/layout.html#grids-layout-for-plots
grid = gridplot([[p1, p2], [p3, p4]])
plot_script, plot_div = components(grid)
# 2. passing multiple plots to components also didn't work
# https://bokeh.pydata.org/en/latest/docs/user_guide/embed.html#components
plot_script, plot_div = components((p1, p2, p3, p4))
# 3. looping through components and then embedding all individual script and div
plot_divs = []
plot_scripts = []
for p in (p1, p2, p3, p4):
plot_script, plot_div = components(p)
plot_divs.append(plot_div)
plot_scripts.append(plot_script)
The problem is there's no error message, it's just no plots would show up ...
from fullstackpython.com.
unfortunately I looked through my Bokeh projects and haven't had to put multiple plots on a single page so I haven't had this issue. if I have time I'd love to give it a try but for a faster response it's worth dropping a note to the Bokeh devs (https://github.com/bokeh/bokeh) with your attempts and the lack of documentation around what seems like it would be a straightforward bit to code
from fullstackpython.com.
Gotcha, thanks ~~
from fullstackpython.com.
Hello,
hmm I don't have time to check this out myself right now but did you double the line
script, div = components(plot)
so it was separated into unique variables for the script and div for 2 separate plots? did it just not display or give a certain error message?
Hello Matt,
have you found the solution how to handle multiple plots on same page?
https://stackoverflow.com/questions/54734169/bokeh-django-embedding-more-independent-plots-via-components
from fullstackpython.com.
sorry @martinh85, I have not had time to look into it further. Bokeh has evolved a lot since I wrote this post so at some point I'll need to completely refactor what's in it to keep it up to date
from fullstackpython.com.
sorry @martinh85, I have not had time to look into it further. Bokeh has evolved a lot since I wrote this post so at some point I'll need to completely refactor what's in it to keep it up to date
thanks anyway Matt
from fullstackpython.com.
Related Issues (20)
- StarterBot Certificate issues HOT 2
- logger issue
- Flask app logger not working when running within gunicorn
- Async
- Dial number then extra keys HOT 1
- Map not displaying using Mapbox tutorial. HOT 11
- slackclient changes have made this tutorial obsolete HOT 1
- Section on Natural Language Processing HOT 3
- Learning pandas by Exploring COVID19 using panda version 1.0.1
- How to insert the marker in Mapbox using Django
- Blog RSS feed
- Guidelines for Experienced Developers
- Link for Generators on Python page?
- Inaccurate Description of Microsoft/Oracle in Enterprise Python
- Queues.io is archived
- AttributeError: module 'plugins.pelican-toc' has no attribute 'register'
- Django-user-visit
- Speechmatics - try it out?
- Broken link on Flask main page
- Content update suggestion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fullstackpython.com.