V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
d0m2o08
V2EX  ›  Python

求助这种图用 Python 怎么画,或者用什么库可以实现

  •  1
     
  •   d0m2o08 · 2018-06-11 10:04:52 +08:00 · 1531 次点击
    这是一个创建于 2143 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我昨天查了一下 Matplotlib 这个库 发现这个库有点太复杂了, 一时半会理解不了

    有没有简单点的办法实现,求指点一下

    RicardoScofileld
        1
    RicardoScofileld  
       2018-06-11 10:17:58 +08:00
    看样子你是要实现一个进度条啊 可以看看这个
    https://github.com/tqdm/tqdm
    RyougiShiki
        2
    RyougiShiki  
       2018-06-11 10:21:16 +08:00
    ![pygal]( http://www.pygal.org/en/stable/documentation/types/bar.html)
    pygal 这个库算简单的了,我当时比较了几种流行图标库选的它。bar stacked 水平方向,画一行,去掉表头,接近你的需求。
    d0m2o08
        3
    d0m2o08  
    OP
       2018-06-11 10:31:01 +08:00
    @RicardoScofileld 不是进度条 我想图表示使用量
    d0m2o08
        4
    d0m2o08  
    OP
       2018-06-11 10:31:12 +08:00
    @RyougiShiki 感谢 我研究一下
    d0m2o08
        5
    d0m2o08  
    OP
       2018-06-11 10:32:38 +08:00
    我用 pil 实现了一下

    from PIL import Image
    imbg = Image.new('RGB',(300,30),'gray')
    imft = Image.new('RGB',(30,30), 'green')
    imbg.paste(imft)
    imbg.save(r'd:\a.bmp')

    感谢各位大神
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3316 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:39 · PVG 08:39 · LAX 17:39 · JFK 20:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.