| |
| C:\Users\ychen>pip install pyecharts |
| Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ |
| Collecting pyecharts |
| Downloading https://mirrors.aliyun.com/pypi/packages/2a/7e/bd0d5e87d4077c89294f48e2452bb64677f7183ba688d29220645193c197/pyecharts-2.0.5-py3-none-any.whl (146 kB) |
| |████████████████████████████████| 146 kB 327 kB/s |
| Collecting simplejson |
| Downloading https://mirrors.aliyun.com/pypi/packages/7f/24/14885a14bd3c2ac8dfffa16ae77de7a69be3205bd00b53a68f7e531e231d/simplejson-3.19.2-cp36-cp36m-win_amd64.whl (76 kB) |
| |████████████████████████████████| 76 kB 106 kB/s |
| Collecting prettytable |
| Downloading https://mirrors.aliyun.com/pypi/packages/9e/6d/40a24eaa03ea4418129708fd3f0f17eda73d568f16d4d4fd412566168b4c/prettytable-2.5.0-py3-none-any.whl (24 kB) |
| Requirement already satisfied: jinja2 in c:\programdata\anaconda3\lib\site-packages (from pyecharts) (3.0.3) |
| Requirement already satisfied: MarkupSafe>=2.0 in c:\programdata\anaconda3\lib\site-packages (from jinja2->pyecharts) (2.0.1) |
| Requirement already satisfied: wcwidth in c:\programdata\anaconda3\lib\site-packages (from prettytable->pyecharts) (0.1.7) |
| Requirement already satisfied: importlib-metadata in c:\programdata\anaconda3\lib\site-packages (from prettytable->pyecharts) (4.8.3) |
| Requirement already satisfied: typing-extensions>=3.6.4 in c:\programdata\anaconda3\lib\site-packages (from importlib-metadata->prettytable->pyecharts) (4.1.1) |
| Requirement already satisfied: zipp>=0.5 in c:\programdata\anaconda3\lib\site-packages (from importlib-metadata->prettytable->pyecharts) (3.6.0) |
| Installing collected packages: simplejson, prettytable, pyecharts |
| Successfully installed prettytable-2.5.0 pyecharts-2.0.5 simplejson-3.19.2 |
| import pyecharts |
| |
| |
| print(pyecharts.__version__) |
| from pyecharts.charts import Bar |
| |
| bar = Bar() |
| bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]) |
| bar.add_yaxis("商家A", [5, 20, 36, 10, 75, 90]) |
| |
| |
| bar.render() |
| |
点击查看详情

| from pyecharts.charts import Bar |
| |
| bar = ( |
| Bar() |
| .add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]) |
| .add_yaxis("商家A", [5, 20, 36, 10, 75, 90]) |
| ) |
| bar.render() |
| |
点击查看详情

| from pyecharts.charts import Bar |
| from pyecharts import options as opts |
| |
| |
| |
| |
| bar = ( |
| Bar() |
| .add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]) |
| .add_yaxis("商家A", [5, 20, 36, 10, 75, 90]) |
| .set_global_opts(title_opts=opts.TitleOpts(title="主标题", subtitle="副标题")) |
| |
| |
| ) |
| bar.render() |
| |
| |
| bar = Bar() |
| bar.add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]) |
| bar.add_yaxis("商家A", [5, 20, 36, 10, 75, 90]) |
| bar.set_global_opts(title_opts=opts.TitleOpts(title="主标题", subtitle="副标题")) |
| bar.render() |
| |
点击查看详情

| C:\Users\ychen>pip install snapshot-selenium |
| Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ |
| Collecting snapshot-selenium |
| Downloading https://mirrors.aliyun.com/pypi/packages/64/d9/89e6835708320f8700246a5683133bf99f2743eaaa218e6f36f31fb7f7e7/snapshot_selenium-0.0.2-py2.py3-none-any.whl (3.0 kB) |
| Requirement already satisfied: selenium in c:\programdata\anaconda3\lib\site-packages (from snapshot-selenium) (3.141.0) |
| Requirement already satisfied: urllib3 in c:\programdata\anaconda3\lib\site-packages (from selenium->snapshot-selenium) (1.26.18) |
| Installing collected packages: snapshot-selenium |
| Successfully installed snapshot-selenium-0.0.2 |
| from pyecharts.charts import Bar |
| from pyecharts.render import make_snapshot |
| |
| |
| from snapshot_selenium import snapshot |
| |
| bar = ( |
| Bar() |
| .add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]) |
| .add_yaxis("商家A", [5, 20, 36, 10, 75, 90]) |
| ) |
| make_snapshot(snapshot, bar.render(), "bar.png") |
点击查看详情

| from pyecharts.charts import Bar |
| from pyecharts import options as opts |
| |
| from pyecharts.globals import ThemeType |
| from pyecharts.render import make_snapshot |
| from snapshot_selenium import snapshot |
| |
| bar = ( |
| Bar(init_opts=opts.InitOpts(theme=ThemeType.LIGHT)) |
| .add_xaxis(["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]) |
| .add_yaxis("商家A", [5, 20, 36, 10, 75, 90]) |
| .add_yaxis("商家B", [15, 6, 45, 20, 35, 66]) |
| .set_global_opts(title_opts=opts.TitleOpts(title="主标题", subtitle="副标题")) |
| ) |
| |
| make_snapshot(snapshot, bar.render(), "bar.png") |
点击查看详情

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2022-05-06 微信小程序开发入门