Snippets
========
This page contains extended snippets of code used in some sections of the wiki page to obtain figures or results.
<a name="snippet1"></a>Snippet 1
---------
Plots 3 equidistant projection maps on a single figure with a single color bar. See in [context](example.md#snippet1).
```r
png('equi_map_raw_all.png', width = 800, height = 300, type = "Xlib")
layout(matrix(c(1, 1, 2, 2, 3, 3, 
                0, 4, 4, 4, 4, 0), 
              2, 6, byrow = TRUE),
       heights = c(5, 1))
brks <- seq(min(data$mod, data$obs, na.rm = TRUE), 
            max(data$mod, data$obs, na.rm = TRUE), 
            length.out = 21)
cols <- clim.colors(20)
PlotEquiMap(data$mod[1,1,1,1,,], data$lon, data$lat, brks = brks, cols = cols, drawleg = FALSE, toptitle = 'Experiment A: tas (K)', sizetit = 0.7)
PlotEquiMap(data$mod[2,1,1,1,,], data$lon, data$lat, brks = brks, cols = cols, drawleg = FALSE, toptitle = 'Experiment B: tas (K)', sizetit = 0.7)
PlotEquiMap(data$obs[1,1,1,1,,], data$lon, data$lat, brks = brks, cols = cols, drawleg = FALSE, toptitle = 'Observation X: tas (K)', sizetit = 0.7)
ColorBar(brks, cols, vert = FALSE, subsampleg = 5)
dev.off()
```

<img src="equi_map_raw_all.png" />
