Create Beautiful charts in python
You may think that python is not suitable for graphic interface development. But python has a very beautiful icon module: pycha.
Isn't it good? Of course, this is only a small part of the chart, there are many other examples. Next let's take a look at how to install this module.
1. Install Pycairo
Because pycha depends on pycairo, we will first install the dependency.
Http://www.lfd.uci.edu /~ Gohlke/pythonlibs/first go to this URL to download the corresponding version of pycairo. I am python2.7 windows 64-bit, so I chose the first one.
Download is a whl format file. We will use pip for installation. If you choose to install pip when installing python, your system will already have pip; otherwise, you will install it yourself. (Enter pip in the cmd command line and press Enter. If a bunch of prompts are not found but are displayed, it indicates that pip has been installed .)
Go to the directory where pycairo is located in the command line and run the following command to install it:
pip install pycairo-1.10.0-cp27-none-win32.whl
As shown in:
Ii. Install Pycha
Decompress the package to a folder.
Use the command line to enter the extracted folder and run the following command to install it:
setup.py install
As shown in:
Download source code: http://download.csdn.net/detail/xingjiarong/9431067 decompress to the corresponding folder, just install pycha on the line, use the command line to enter the folder, usesetup.py install
Command.
You can use the files in examples for testing.
Two files are unavailable during my test, test. py and piechart. py cannot load pycha. ring I will change it to import ring, and the corresponding pycha below. the ring is also changed to the ring, because they can be referenced in a folder, and then they can all be used. If you have any questions, please join us. Thank you for your support.