-2
plot(mydatainR$E.Coli,mydatainR$Time,xlab="Time",ylab="E.Coli",main="Total Phosphorus and E.Coli Values",col.main="blue",col.lab="green",xlim=c(2012,2018),ylim=c(0.000,0.05))

Here is my data and how it is formatted in R:

 Time Total.Phospours E.Coli
1  2012           0.014     12
2  2012           0.014     10
3  2012              NA     NA
4  2012           0.009     68
5  2012           0.014    144
6  2012           0.012     60
7  2012           0.009     24
8  2012           0.009     10
9  2013           0.009     47
10 2013           0.009     92
11 2013           0.011     99
12 2013           0.009     42
13 2013           0.009     98
14 2013           0.009     17
15 2013           0.009     98
16 2014           0.014     16
17 2014           0.009     53
18 2014           0.009    164
19 2014           0.009    580
20 2014           0.015     13
21 2014           0.010     25
22 2014           0.009     21
23 2015           0.009     22
Jim Jones
  • 18,404
  • 3
  • 35
  • 44
  • 2
    Please format your question appropriately: follow instructions here https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Gautam Apr 25 '18 at 17:12

1 Answers1

1

Your problems arise in the xlim and ylim settings (mostly). Try simply plotting only the desired variables, as follows:

plot(mydatainR$E.Coli,mydatainR$Time)

You'll get a basic plot. You can then modify the other parameters.

Edward Carney
  • 1,372
  • 9
  • 7