# HG changeset patch # User greg # Date 1515684779 18000 # Node ID 0ba72d5ca209c5c378f41e4229e2d602d11a711d # Parent 387b460ddd433b6e60c64ad6543c53376343fe91 Uploaded diff -r 387b460ddd43 -r 0ba72d5ca209 create_heatmap.R --- 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);