two dependent variables with plot function

Hi @lupo,

I'm afraid it's not clear to me what you need. A reprex would be very helpful, please consider providing one if this doesn't help.

Help pages you should read if you don't already know them:
?par
?lines
?points
?axis
?text
?mtext
Armed with these, you should be able to build up the plot as desired. Alternatively, check out package ggplot2.

I have given a plot below which as far as I can tell comes close to your situation.

BOD$Time <- as.factor(BOD$Time)
BOD$demand2 <- BOD$demand + 1

plot(BOD$Time, type = 'n', ylim = c(8, 22), axes = FALSE)
#> Warning in plot.window(xlim, ylim, log = log, ...): graphical parameter "type"
#> is obsolete
#> Warning in title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...):
#> graphical parameter "type" is obsolete
lines(demand ~ Time, BOD, type = 'b', col = 1,
      pch = ifelse(demand < 16, 15, 0))
lines(demand + 1 ~ Time, BOD, type = 'b', col = 2,
      pch = ifelse(demand < 16, 16, 1))
axis(side = 1, at = c(1:6), labels = paste('label', 1:6))

image