Now, examine the variation of some descriptors along the river by means of line
plots (Fig. 2.8):
## Line plots
par(mfrow = c(2, 2))
plot(env$dfs, env$ele,
type = "l",
xlab = "Distance from the source (km)",
ylab = "Elevation (m)",
col = "red", main = "Elevation"
)
0
100 200 300 400
200 400 600 800
Elevation
Distance from the source (km)
Elevation (m)
0
100 200 300 400
0 10
30
50
70
Discharge
Distance from the source (km)
Discharge (m3/s)
0
100 200 300 400
4
6
8
10
12
Oxygen
Distance from the source (km)
Oxygen (mg/L)
0
100 200 300 400
0 1 2 3 4 5 6
Nitrate
Distance from the source (km)
Nitrate (mg/L)
Fig. 2.8 Line plots of four environmental variables
30
2 Exploratory Data Analysis
plots (Fig. 2.8):
## Line plots
par(mfrow = c(2, 2))
plot(env$dfs, env$ele,
type = "l",
xlab = "Distance from the source (km)",
ylab = "Elevation (m)",
col = "red", main = "Elevation"
)
0
100 200 300 400
200 400 600 800
Elevation
Distance from the source (km)
Elevation (m)
0
100 200 300 400
0 10
30
50
70
Discharge
Distance from the source (km)
Discharge (m3/s)
0
100 200 300 400
4
6
8
10
12
Oxygen
Distance from the source (km)
Oxygen (mg/L)
0
100 200 300 400
0 1 2 3 4 5 6
Nitrate
Distance from the source (km)
Nitrate (mg/L)
Fig. 2.8 Line plots of four environmental variables
30
2 Exploratory Data Analysis
