Making Soil Property vs. Depth Plots
Example with randomly generated data
Generate some data
## generate some profile depths: 0 - 150, in 10 cm incrementsdepth <- seq(0,150, by=10)## generate some property: random numbers in this caseprop <- rnorm(n=length(depth), mean=15, sd=2)## since the 0 is not a depth, and we would like the graph to start from 0## make the first property row (associated with depth 0) the same as the second## property rowprop[1] <- prop[2]## combine into a table: data read in from a spread sheet would already be in this formatsoil <- data.frame(depth=depth, prop=prop)X
The dataframe 'soil' looks like this:
depth prop1 0 13.80257 ** note that these are the same2 12 13.80257 ** note that these are the same3 24 18.402984 36 13.374465 48 13.279736 60 14.652887 72 16.073398 84 15.974519 96 16.2997010 108 16.3215511 120 14.6369912 132 13.2648613 144 13.81730X
Plot the data:
## note the reversal of the y-axis with ylim=c(150,0)plot(depth ~ prop, data=soil, ylim=c(150,0), type='s', ylab='Depth', xlab='Property', main='Property vs. Depth Plot')X
Software
- General Purpose Programming with Scripting Languages
- LaTeX Tips and Tricks
- PostGIS: Spatially enabled Relational Database Sytem
- PROJ: forward and reverse geographic projections
- GDAL and OGR: geodata conversion and re-projection tools
- R: advanced statistical package
- Access Data Stored in a Postgresql Database
- Additive Time Series Decomposition in R: Soil Moisture and Temperature Data
- Aggregating SSURGO Data in R
- Cluster Analysis 1: finding groups in a randomly generated 2-dimensional dataset
- Color Functions
- Comparison of Slope and Intercept Terms for Multi-Level Model
- Comparison of Slope and Intercept Terms for Multi-Level Model II: Using Contrasts
- Creating a Custom Panel Function (R - Lattice Graphics)
- Customized Scatterplot Ideas
- Estimating Missing Data with aregImpute() {R}
- Exploration of Multivariate Data
- Interactive 3D plots with the rgl package
- Making Soil Property vs. Depth Plots
- Numerical Integration/Differentiation in R: FTIR Spectra
- Plotting XRD (X-Ray Diffraction) Data
- Using lm() and predict() to apply a standard curve to Analytical Data
- Working with Spatial Data
- Comparison of PSA Results: Pipette vs. Laser Granulometer
- GRASS GIS: raster, vector, and imagery analysis
- Generic Mapping Tools: high quality map production