Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fogleman/Punchcard
Generate GitHub-style punchcard charts with ease.
https://github.com/fogleman/Punchcard
Last synced: about 1 month ago
JSON representation
Generate GitHub-style punchcard charts with ease.
- Host: GitHub
- URL: https://github.com/fogleman/Punchcard
- Owner: fogleman
- License: mit
- Created: 2014-03-24T00:15:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-25T12:36:41.000Z (over 7 years ago)
- Last Synced: 2024-07-17T13:59:43.309Z (2 months ago)
- Language: Python
- Size: 340 KB
- Stars: 240
- Watchers: 9
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Punchcard
Generate GitHub-style punchcard charts with ease.
python punchcard.py sample.csv output.png "Sample Chart"
![Sample](http://i.imgur.com/I50Rejy.png)
### Dependencies
brew install py2cairo pango pygtk
### Command Line
python punchcard.py input.csv output.png [title]
### Programmatically
punchcard(png_path, data, row_labels, col_labels)
`data` must be a two-dimensional array of data for the punchcard chart (a list of lists where each list is a row). `len(data) == len(row_labels)` and `len(data[0]) == len(col_labels)`
The following keyword arguments are also allowed.
| keyword | default | description |
|------------------------|------------:|--------------------------------------------|
|padding | 12| padding between chart, labels and boundary |
|cell_padding | 4| padding between circles and cell edges |
|min_size | 4| minimum circle size, for smallest value |
|max_size | 32| maximum circle size, for largest value |
|min_color | 0.8| grayscale value for smallest value |
|max_color | 0.0| grayscale value for largest value |
|font | 'Helvetica'| facename used for labels |
|font_size | 14| font size for labels |
|font_bold | False| bold labels |
|title | None| title text, optional |
|title_font | 'Helvetica'| facename used for title |
|title_font_size | 20| font size for title |
|title_font_bold | True| bold title |
|diagonal_column_labels | False| diagonal column labels |