pro layout_plots, relative_size, y_gap, ysize, $ top_space, bottom_space, plot_loc ;Created: Mark Chutter, UNH ;Jan., 2001 ; ;Modified: ; ;Calling Interface: ;relative_size intarr (i) an array containing the relative y sizes of ; things to be plotted ;y_gap float (i) spacing between plots ;top_space int (i) space to allow at top ;bottom_space int (i) space to allow at bottom ;plot_loc intarr (o) specifies bottom and top coordinate for each plot ; ;layout_plots finds somewhat reasonable postions for plots on a page ;when you have many plots. The results are meant to be used for ;pltting with normal coordinates. num_plots = n_elements(relative_size) gap_size = (num_plots-1) * y_gap y_total = float(total(relative_size)) + float(gap_size) plot_loc = intarr(2, num_plots) plot_space = ysize - top_space - bottom_space plot_block = plot_space / y_total loc_pointer = bottom_space for i = 0, num_plots-1 do begin plot_loc[0, i] = loc_pointer loc_pointer = loc_pointer + relative_size[i] * plot_block plot_loc[1, i] = loc_pointer loc_pointer = loc_pointer + y_gap * plot_block endfor end