Mercurial > repos > alvarofaure > bitlab
comparison chromeister/bin/plot.R @ 0:7fdf47a0bae8 draft
Uploaded
author | alvarofaure |
---|---|
date | Wed, 12 Dec 2018 07:18:40 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7fdf47a0bae8 |
---|---|
1 #!/usr/bin/env Rscript | |
2 args = commandArgs(trailingOnly=TRUE) | |
3 | |
4 if(length(args) < 1){ | |
5 stop("USE: Rscript --vanilla plot.R <matrix>") | |
6 } | |
7 | |
8 | |
9 path_mat = args[1] | |
10 | |
11 | |
12 data <- read.csv(path_mat, header = FALSE, sep = " ", skip=1) | |
13 | |
14 | |
15 png(paste(path_mat, ".png", sep=""), width = length(data[,1]), height = length(data[,1])) | |
16 image(t(as.matrix(data)), col = grey(seq(1, 0, length = 256)), xaxt='n', yaxt='n') | |
17 dev.off() |