Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Bokeh, Matplotlib or Plotly?
-
I'm currently learning flask and hoping to make a web app that will pull user-selected data from a MySQL database.
Graphing the data would be great, and I have just discovered Bokeh and Plotly, both of which have Python APIs. I am not familiar (yet) with Matplotlib.
Has anyone any experience of using any of these options (particularly within Flask)?
-
matplotlib is fairly easy to work with, especially if you have any experience with matlab.
You get an image out using figure.savefig.You would likely need to create a new figure for each user or connection.
-
None of the above. Rendering in the back-end is almost always a bad idea. Browsers are built to render content. By rendering images on your server, you're putting unnecessary load on your server, and sacrificing both interactivity and accessibility. Use http://chartjs.org/ instead.
-
@Webmaster4o Looks great! I'll check it out.
-
@chriswilson The advantage is that with a client-side library, you can do real-time animations, tooltips, and interaction. But you'll have to know a bit of JS to get through it (though JS isn't hard)
-
@Webmaster4o I'm starting to learn JS now, so hopefully it won't be a problem!