-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
208 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: go | ||
go: | ||
- 1.12 | ||
env: | ||
global: | ||
- GO111MODULE=on | ||
- secure: jsI88hoE5j+ffbxf6hvbA7mtkizkHrmd/RmqFncATUAgE7ny8W0P1pN9wXqncMD/9YaG7cic1H/+NuYuH+cU/GHKkAR2AY8Rbf+4uGiATMfG7tuySVYDdwdYEQKcKXJ6rHSU8oNLBVckZJNv1bqk+LEHhzEXUI7sFEwxvcmTb/zH8TXf5TyTpquW9CWwzsudbl6RRYuzU2DIFBh99/4umY/94FHOHnxm/AENMnsiIjRCZtdqpVdvtaY43rQphotmzR+5IwvMaT/7jxwtksR5HAuEZ2eFQd1+mpOeqddZJ3eigx/DvTkH6N22NmAZL3b2oJKzBDAJCjz/f6rBiEpZBlO8fSHKKMR3XZySbJgNEL7TYr6jEKwNsFo5Bkcj2qKtrPwswxTCihPVBb2QhimN7zvCFi1KgZRcUr4d+FP6YGXsFoBRggDpeNt1x2EXjusfHEnuJY/uoypwJSi2vlGqXuNb45nBVUXS5CIz/kTr2KwYT9sPn/V59TiEuqefX3D3PASzQY/NVd4gcPSZCAXUMs0IA50qfo3/sBW/tFABdhcMhzjEOHc0fJeUAFn+w8O2xmigifUdqh6nPh/4TODSWwlFk+icwDDNdInAOCxThGHamuB1Jlr4P7UvG1itUnQT8hnAcRe8/VjD8b9QGIR9mLbCVFYpAc7PfbN3hrRgzgc= | ||
before_script: | ||
- go get github.com/mattn/goveralls | ||
script: | ||
- make test build | ||
- "$GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,66 @@ | ||
[![Build Status](https://travis-ci.com/tamada/goheatman.svg?branch=master)](https://travis-ci.com/tamada/goheatman) | ||
[![Coverage Status](https://coveralls.io/repos/github/tamada/goheatman/badge.svg?branch=master)](https://coveralls.io/github/tamada/goheatman?branch=master) | ||
|
||
# goheatman | ||
|
||
Create heat map image from given csv file. | ||
Go language implementation of [tamada/heatman](https://github.com/tamada/heatman). | ||
|
||
## Usage | ||
|
||
```sh | ||
$ heatman -h both testdata/sample.csv | ||
# generate heatman.png. | ||
$ heatman -H # print the following help message. | ||
heatman [OPTIONS] [CSVFILE] | ||
OPTIONS | ||
-a, --additional-line-gap <GAP> specifies the gap of assistant lines per cells. | ||
if GAP is less equals than 0, no assistant lines are drawn. | ||
-c, --color <TYPE> specifies heatmap color type (color or gray), default: color. | ||
-d, --dest <DEST> specifies the destination file. | ||
-h, --headers <HEADER> specifies header model (both, row, column, or no), default: no. | ||
-p, --pixel <SIZE> specifies the pixel size per cell. | ||
-s, --scaler generates scaler of heatmap. If this option was specified, | ||
additional-line-gap, headers, pixel, and CSVFILE are ignored. | ||
-H, --help print this message. | ||
ARGUMENTS | ||
CSVFILE input csv files with no headers. | ||
if no csv files are specified, heatman read csv from stdin. | ||
The value of each cell must be 0.0 to 1.0. | ||
$ heatman -p 15 -a 4 -h both -d heatman2.png testdata/sample.csv | ||
# generate heatmap2.png. | ||
$ heatman -p 15 -h both --color gray -d heatman3.png testdata/sample.csv | ||
# generate heatmap3.png in gray scale. | ||
$ heatman --scaler -d heatman_scaler.png | ||
# generate heatmap_scaler.png which shows scaler of colors. | ||
``` | ||
### The Results | ||
Each image is generated by above command. The sources of below images are same. | ||
#### heatman.png | ||
![heatman.png](https://github.com/tamada/goheatman/raw/master/testdata/heatman.png) | ||
It was too small. | ||
The one cell in csv is shown in one pixel square. | ||
#### heatman2.png | ||
The one cell in csv is shown in 15-pixel square, and the auxiliary lines are drawn by 4 cells. | ||
![heatman2.png](https://github.com/tamada/heatman/raw/master/testdata/heatman2.png) | ||
#### heatman_gray.png | ||
The image is gray-scaled heatmap. | ||
![heatman3.png](https://github.com/tamada/heatman/raw/master/testdata/heatman_gray.png) | ||
#### heatman_scaler.png | ||
This is generated scaler image. | ||
The most right side shows 1.0, and the most left side represents 0.0. | ||
![heatman_scaler.png](https://github.com/tamada/heatman/raw/master/testdata/heatman_scaler.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/tamada/goheatman | ||
|
||
go 1.12 | ||
|
||
require github.com/ogier/pflag v0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/ogier/pflag v0.0.1 h1:RW6JSWSu/RkSatfcLtogGfFgpim5p7ARQ10ECk5O750= | ||
github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFPE+g= |
Oops, something went wrong.