上面是数据
mydata<-data.frame(Cut=c("Fair","Good","Very Good","Premium","Ideal"),
Price=c(4300,3800,3950,4700,3500))
order<-sort(mydata$Price,index.return=TRUE,decreasing = TRUE)
mydata$Cut <- factor(mydata$Cut, levels = mydata$Cut[order$ix])
ggplot(data=mydata,aes(Cut,Price))+geom_bar(stat = "identity", width = 0.8,color = "red",size=0.25,alpha=1)
报错
Error in wes_palette(n = 3, name = "Darjeeling") :
could not find function "wes_palette"
只有用ggplot函数的时候才会报这个错,ggplot2包重装了还是这样
安装包wesanderson试试:
install.packages("wesanderson")
library(wesanderson)
题主你好,请问你的问题解决了吗?我也遇到了相同的问题