// "Radial Scattergraph" // Takes a CSV (comma-separated values) list of angles and values // and draws a radial scattergraph. A sample list is available at // http://rsb.info.nih.gov/ij/macros/data/angles.csv requires("1.37v"); progress("Open file, which must be a csv list in (angle, value) format", 1, 10); string = File.openAsString(""); start = getTime; progress("Split the CSV file into an array of lines", 2, 10); lines = split(string, "\n"); //initialise some variables theta = newArray(lengthOf(lines)); r = newArray(lengthOf(lines)); rmax = 0; progress("Find the maximum radius (to determine the outer boundary)", 3, 10); n = lengthOf(lines); for (i=0; i rmax) rmax = r[i]; } radius = 500; margin = 5; image = 2*(radius+margin); //Draw the new image setBatchMode(true); newImage("Untitled", "8-bit Black", image, image, 1); if (File.exists(getDirectory("imagej")+"luts/Orange Hot.lut")) run("Orange Hot"); else run("Fire"); progress("Save point coordinates in arrays", 4, 10); xp = newArray(n); yp = newArray(n); zp = newArray(n); for (i=0; imax) max = mean; } run("Select None"); progress("Draw each point in a color proportional to neighborhood density", 8, 10); scale = 200/(max-min); for (i=0; i