omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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?

    Pythonista
    3
    6
    7815
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chriswilson
      chriswilson last edited by

      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)?

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        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.

        1 Reply Last reply Reply Quote 1
        • Webmaster4o
          Webmaster4o last edited by

          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.

          chriswilson 1 Reply Last reply Reply Quote 1
          • chriswilson
            chriswilson @Webmaster4o last edited by

            @Webmaster4o Looks great! I'll check it out.

            1 Reply Last reply Reply Quote 1
            • Webmaster4o
              Webmaster4o last edited by

              @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)

              chriswilson 1 Reply Last reply Reply Quote 1
              • chriswilson
                chriswilson @Webmaster4o last edited by

                @Webmaster4o I'm starting to learn JS now, so hopefully it won't be a problem!

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors