Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oldj/pyheatmap
python heat map library
https://github.com/oldj/pyheatmap
Last synced: about 2 months ago
JSON representation
python heat map library
- Host: GitHub
- URL: https://github.com/oldj/pyheatmap
- Owner: oldj
- License: mit
- Created: 2012-09-03T07:55:28.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2018-11-08T02:18:46.000Z (almost 6 years ago)
- Last Synced: 2024-07-19T10:03:29.070Z (2 months ago)
- Language: Python
- Size: 881 KB
- Stars: 138
- Watchers: 16
- Forks: 52
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyHeatMap
* Author: oldj
* Email: [email protected]
* Blog: https://oldj.net/
* Source: https://github.com/oldj/pyheatmappyHeatMap is a Python library for painting heat maps. It depends on [Pillow](https://python-pillow.github.io/).
Python 2/3 compatible.## Screenshots
### hit map
![hit map](https://raw.github.com/oldj/pyheatmap/master/examples/hit.png)
### heat map
![heat map](https://raw.github.com/oldj/pyheatmap/master/examples/heat.png)
## Install
### by pip:
```bash
pip install pyheatmap
```### by easy_install:
```bash
easy_install pyheatmap
```### from source code:
```bash
git clone git://github.com/oldj/pyheatmap.git
cd pyheatmap
python setup.py install
```## Example:
```python
# -*- coding: utf-8 -*-import urllib
from pyheatmap.heatmap import HeatMapdef main():
# download test data
url = "https://raw.github.com/oldj/pyheatmap/master/examples/test_data.txt"
sdata = urllib.urlopen(url).read().split("\n")
data = []
for ln in sdata:
a = ln.split(",")
if len(a) != 2:
continue
a = [int(i) for i in a]
data.append(a)# start painting
hm = HeatMap(data)
hm.clickmap(save_as="hit.png")
hm.heatmap(save_as="heat.png")if __name__ == "__main__":
main()
```## Copyright
This library is free and is provided under the MIT open source license.
## Update
- 2015-08-31 Python 2/3 compatible.
- 2012-09-03 Create.