Simple Visualization in Python
Visualization of data or graph can be achieved by a variety of means in Python. This post list configuration for some simple visualizations. Before introduction of some visualization package, I’ll list some procedures for configure and launch the Jupyter notebook, which is a convenient environment for testing Python code.
Jupyter, the playground
Jupyter, formerly the known as iPython
(actually, the ipython becomes
a submoudle of the Jupyter project which provide the kernel for computing),
is a notebook style environment for exploring some new package or new task in Python.
Installation
With the pip installed, jupyter can be installed easily via the following command. (If the pip is not set up, you can check out the previous post.
|
|
Installation via mirror pip server
Add the following configuration entry into default configuration file. Generally, this file is located on Linux. Create the file if this file does not eixst.
|
|
A comprehensive list of the available mirror server can be retrieved from the
PyPI Mirror Status site. The replace the url
within the configuration entry. (Don’t forget the path section simple
of the URL).
For more information related to the configuration of pip, check out the configuration section of official document.
There is also an approach for temporarily applying the mirror server, which is passing
the location of the mirror server to pip
command argument. Like the following command shows:
|
|
Start the notebook
The following command will start an server at 8889
port (by default) and launch the default
browser to access the web interface.
|
|
If you want a remote access of the web interface, use the following options to disable the launching of browser and bind TCP connection to any network interface available.
|
|
PyGraphViz
GraphViz is a open source application for visualization of graph. It can generate high quality graph by simply specifying the vertices and edges, without worrying about the layout of each element in the graph.
PyGraphViz is a python bonding of the package.
|
|
PyDot
PyDot is another binding to GraphViz in Python with special attention on the Dot engine of GraphViz. (Thus the package is named as PyDot.) I plan to record something about that small language in the next post.
|
|