qqhtml.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:qqmbr 作者: ischurov 项目源码 文件源码
def make_plotly_fig(self, code: str) -> str:
        global plotly
        if plotly is None:
            import plotly
        loc: Dict[str, Any] = {}
        self.plotly_globals.update({'plot': self.plotly_plotter.plot,
                                    'go': plotly.graph_objs,
                                    'plotly': plotly})

        gl = self.plotly_globals
        exec(code, gl, loc)
        self.js_top['plotly'] = ("<script src='https://cdn.plot.ly/plotly-"
                                 "latest.min.js'></script>")
        return self.plotly_plotter.get_data()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号