plotgrid places plots on a grid, governed by a number of columns.
(x, y int, files []string)
| 286 | |
| 287 | // plotgrid places plots on a grid, governed by a number of columns. |
| 288 | func plotgrid(x, y int, files []string) { |
| 289 | px := x |
| 290 | for i, f := range files { |
| 291 | if i > 0 && i%plotc == 0 && !plotopt["sameplot"] { |
| 292 | px = x |
| 293 | y += (ploth + gutter) |
| 294 | } |
| 295 | doplot(px, y, f) |
| 296 | if !plotopt["sameplot"] { |
| 297 | px += (plotw + gutter) |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | // main plots data from specified files or standard input in a |
| 303 | // grid where plotc specifies the number of columns. |