我正在遵循书中的一个例子Machine Learning for Hackers
。R 2.15.1
并被ggplot 0.91
使用。我收到以下错误:
Error in continuous_scale(aesthetics, "date", identity, breaks = breaks, :
unused argument(s) (major = "5 years", format = "%Y")
In addition: Warning message:
In discrete_scale(aesthetic, "manual", pal, ...) :
"legend" argument in scale_XXX is deprecated. Use guide="none" for suppress the guide display.
我尝试运行的代码是
state.plot<-ggplot(all.sightings, aes(x=YearMonth,y=Sightings))+
geom_line(aes(color="darkblue"))+
facet_wrap(~State,nrow=10,ncol=5)+
theme_bw()+
scale_color_manual(values=c("darkblue"="darkblue"),legend=FALSE)+
scale_x_date(major="5 years", format="%Y")+
xlab("Time")+ylab("Number of Sightings")+
opts(title="Number of UFO sightings by Month-Year and U.S. State (1990-2010)")
我用过library(scales)
,但没有用。有任何想法吗?