zoukankan      html  css  js  c++  java
  • pyecharts v1 版本 学习笔记 散点图

    散点图

    基本案例

    from example.commons import Faker
    from pyecharts import options as opts
    from pyecharts.charts import EffectScatter
    from pyecharts.globals import SymbolType
    c = (
            EffectScatter()
           .add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"])
         .add_yaxis('商家A', [114, 55, 27, 101, 125, 27, 105])
           .add_yaxis('商家B',[57, 134, 137, 129, 145, 60, 49])
            .set_global_opts(title_opts=opts.TitleOpts(title="EffectScatter-基本示例"))
        )
    c.render_notebook()

    散点图显示分割线

    from example.commons import Faker
    from pyecharts import options as opts
    from pyecharts.charts import EffectScatter
    from pyecharts.globals import SymbolType
    c = (
            EffectScatter()
           .add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"])
         .add_yaxis('商家A', [114, 55, 27, 101, 125, 27, 105])
           .add_yaxis('商家B',[57, 134, 137, 129, 145, 60, 49])
    #         .set_global_opts(title_opts=opts.TitleOpts(title="EffectScatter-基本示例"))
        .set_global_opts(
                title_opts=opts.TitleOpts(title="EffectScatter-显示分割线"),
                xaxis_opts=opts.AxisOpts(splitline_opts=opts.SplitLineOpts(is_show=True)),
                yaxis_opts=opts.AxisOpts(splitline_opts=opts.SplitLineOpts(is_show=True)),
            )
        )
    c.render_notebook()

  • 相关阅读:
    C语言01
    C++面试总结更新
    Python网络爬虫与信息提取02
    Self-Driving Car 01
    Python网络爬虫与信息提取01
    Python-03
    Shell
    Python-05
    Python-04
    Python-02
  • 原文地址:https://www.cnblogs.com/baili-luoyun/p/11058718.html
Copyright © 2011-2022 走看看