Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Boxes with grey background contain code snippets, and boxes with white background containt code (text) outputs




EXAMPLES


Examples of visualisation of the cell values of rasters (i.e. plotting rasters) in R are presented below. The examples are taken from the “Effects of Cyclone Yasi Green Cover at Mission Beach” tutorial. It can be beneficial to put  Putting the code snippets in context, by looking at a broader section of the R script. Code snippets have a grey background, and outputs have a white background, could be benefitial. Boxes with grey background contain code snippets, and boxes with white background containt code (text) outputs.


We use the function the ‘levelplot’ function to visualise the raster contents. Before using this function, we create a user defined colour palette; with yellow for low Seasonal Persistent Green Cover (SPGC) values, and green for high values. We use the 'grid.arrange' function in the 'gridExtra' package to plot multiple grobs (i.e. grid graphical objects) on a page (i.e. in a single graph).

...