此外,图中的数据应该按状态进行分类。我使用的数据集是来自ggplot2的midwest。由于某些原因,应该基于midwest数据集中的状态的颜色不起作用。当我尝试使用color = state或color = prof_poverty$state时出现错误。Aesthetics must be either length 1 or the same as the data (1): colour。因为有5种不同的状态,所以应该有5种不同的颜色。selectInput('xcol
PC2) %>% left_join(shannon) %>%
ggplot(aes(x=PC1, y=PC2, color: Error: Aesthetics must be either length 1 or the same as the data (9): size 但是,如果我只包含一种美学,例如: ggplot(aes(x=PC1, y=PC2, color=Name))
我试图绘制一个图表,显示三个不同的模型的物种最优和公差wap,lg和reg,但是我一直得到错误的Error: Aesthetics must be either length 1 or the same我还尝试让所有三个模型的物种保持通用,这样数据框中就不会有任何NAs,但我得到了相同的错误。有人能解决这个问题吗?specoptima<-read.csv("regspecopt.csv",header=TRUE)
geom_point(data = spec