Reputation: 41
I am plotting a graph for a parameter x which represents energy usage vs y which represents data-time in %y-%m-%d %h:%m:%s
format. Now, when I issue plot(x,y, other parameters)
I get a box plot, and when I execute plot(x~y, other parameters)
I get a completely different graph (with spikes). The only difference between the two plot commands is the way x,y
parameters are passed.
I searched for relevant document but could not get useful information. Please share your thoughts on this.
Upvotes: 0
Views: 2669
Reputation: 3514
generic plot uses plot(x,y)
, where x and y are the coordinates in a simple scatter plots.
plot(y~x)
?plot.formula
is for plotting a formula. As @alistaire mentioned y~x
Upvotes: 1