Mercurial > repos > greg > ideas
changeset 148:0ba72d5ca209 draft
Uploaded
author | greg |
---|---|
date | Thu, 11 Jan 2018 10:32:59 -0500 |
parents | 387b460ddd43 |
children | a80b76535243 |
files | create_heatmap.R |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/create_heatmap.R Thu Jan 11 10:21:13 2018 -0500 +++ b/create_heatmap.R Thu Jan 11 10:32:59 2018 -0500 @@ -37,6 +37,10 @@ create_heatmap <- function(data_frame, output_file_name, colors=c("white", "dark blue")) { # Plot a heatmap for a .para / .state combination based on the # received data_frame which was created by reading the .para file. + num_columns = dim(data_frame)[2]; + num_rows = dim(data_frame)[1]; + p = (sqrt(9 + 8 * (num_columns-1)) - 3) / 2; + data_matrix = as.matrix(data_frame[,1+1:p] / data_frame[,1]); state_colors_vector = get_state_color_codes_vector(data_frame, colors=colors, color_code_type="hex"); # Open the output PDF file. pdf(file=output_file_name);