16 October 2014

Level plot and bubble plot try out

Dear friends,

I've posted example of level plot and bubble plot on water quality dataset on rpubs. The objective of these plots is to show comparison of element concentration in groundwater and in the river water. The river data plot is located in the lower right position of the figure, making an elbow-like shape.

The plots were made using the following base code:

plotNO3 <- data="data,<o:p" levelplot="" x="" y="">
          xlab="X coord", ylab="Y coord",
          main="Level plot NO3",

bubbleNO3 <- bubble="" data="" o:p="" zcol="NO3">
          xlab="X coord", ylab="Y coord",
          main="Bubble plot NO3",


In this example I used the following packages:
  • lattice        # for plotting
  • dplyr          # for data manipulation
  • gridExtra      # for multiple plot
  • sp             # for spatial analysis
I used gridExtra package to show multi-plots on a page, using the following code.

However, I haven't finished tweaking the code so it can show the figure in the correct size.
I invite you to drop a comment or two.


No comments: