推荐学习书目
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 · Jun 11, 2018 · 2029 views
    This topic created in 2928 days ago, the information mentioned may be changed or developed.

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

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

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

    感谢各位大神
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1015 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 19:25 · PVG 03:25 · LAX 12:25 · JFK 15:25
    ♥ Do have faith in what you're doing.