app.py 文件源码

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

项目:web-dev-for-data-scientists 作者: realpython 项目源码 文件源码
def sample():

    # create the chart
    p = figure(plot_width=400, plot_height=400)

    # add a line renderer
    p.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=2)

    # grab the static resources
    js_resources = INLINE.render_js()
    css_resources = INLINE.render_css()

    # generate javascript and the actual chart via components()
    script, div = components(p)

    # render template
    return render_template(
        'index.html',
        plot_script=script,
        plot_div=div,
        js_resources=js_resources,
        css_resources=css_resources,
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号