Re: [R] Plot two values on same axes

2019-09-27 Thread Rich Shepard
On Fri, 27 Sep 2019, Rolf Turner wrote: You may better off using base R graphics, unless there are considerations which demand the use of lattice. Something like this, maybe: plot(maxtemp ~ sampdate, data=watertemp, type="h", col="red", ) points(maxtemp ~ sampdate, data=

Re: [R] Plot two values on same axes

2019-09-27 Thread Rich Shepard
On Fri, 27 Sep 2019, David Winsemius wrote: Instead of trying to mix lattice and base functions, you might try using the formula: maxtemp+mintemp ~ sampdate And then: col= c(“red”, “blue”) David, I certainly will. I've not needed R for projects for many months and when I looked through prev

Re: [R] Plot two values on same axes

2019-09-26 Thread Rolf Turner
On 27/09/19 10:27 AM, Rich Shepard wrote: I want to plot maximum and minimum water temperatures on the same axes and thought I had the correct syntax: watertemp <- read.table("../../data/hydro/water-temp.dat", header = TRUE, sep =",") watertemp$sampdate <- as.Date(as.character(watertemp$sam

Re: [R] Plot two values on same axes

2019-09-26 Thread David Winsemius
Instead of trying to mix lattice and base functions, you might try using the formula: maxtemp+mintemp ~ sampdate And then: col= c(“red”, “blue”) Sent from my iPhone, so make sure those quotes are ordinary double quotes. — David > On Sep 27, 2019, at 6:27 AM, Rich Shepard wrote: > > I wan

[R] Plot two values on same axes

2019-09-26 Thread Rich Shepard
I want to plot maximum and minimum water temperatures on the same axes and thought I had the correct syntax: watertemp <- read.table("../../data/hydro/water-temp.dat", header = TRUE, sep =",") watertemp$sampdate <- as.Date(as.character(watertemp$sampdate)) watertempsum <- summary(watertemp) prin