Search code examples
pythondjangomatplotlibgraphmatplotlib-widget

Matplot lib image properties in web (Django)


I'd like to output the image to the web created in matplotlib having the very same functionality like it has on desktop when you run the image.show(), for example scaling, moving along the plot more thoroughly.

I've checked out #stack and got old post only offering static images or gif or matplotlib.animate()

I aslo had a look at matplotlib widgets, but those are for desktop GUI only as far as I can see.

Please share some experience or ideas regarding how can I achieve it.

Thanks


Solution

  • Matplotlib is a server side library so you cannot do anything on the client side like that.

    The closest you can come is to either use mpld3 (mpld3 works by converting a matplotlib graph into the html/js that a d3 js graph would need to render) or a different client side library that plots points.