Reputation: 121
I cannot get names to work in box plot. Is it not working because I only have a single vector? Heres what I have tried.
tmp = c(1,1,1,1,2,2,2,2,5,5,5,5,5,6,5,4,7)
boxplot(tmp)
boxplot(tmp, names=c("today"))
boxplot(tmp, names="today")
boxplot(tmp, labels="today")
boxplot(tmp, labels=c("today")
Upvotes: 3
Views: 1029
Reputation: 1702
I was having the same issue and found an alternative at the below link
https://stackoverflow.com/a/25590238/4092304
So could be coded as ...
boxplot(tmp, xlab = "today")
Upvotes: 1