且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从flask,如何将matplotlib图图像发送到JSON对象?

更新时间:2023-11-27 15:39:40

https://github.com/mpld3 /mpld3 mpld3提供了一个基于D3的自定义独立javascript库,该库可解析绘图的JSON表示形式. mpld3 python模块提供了一组例程(使用mplexporter框架)解析matplotlib图并输出mpld3.js可读的JSON描述.

https://github.com/mpld3/mpld3 mpld3 provides a custom stand-alone javascript library built on D3, which parses JSON representations of plots. The mpld3 python module provides a set of routines which parses matplotlib plots (using the mplexporter framework) and outputs the JSON description readable by mpld3.js.