当我绘制一个 facet_wrap() 并将下降线放在 x 轴上时,它们只出现在第一个方面。我做错了什么还是这是一个错误?MWE:
library(plotly)
library(ggplot2)
gg<-ggplot(data = iris,
aes(x = Sepal.Length,
y = Sepal.Width,
color = Species,
group = Petal.Width,
text=sprintf("Petal Width %s<br>Sepal Length: %s", Petal.Width, Sepal.Length)
))+
geom_point()+
facet_wrap(~Species)
ggplotly(gg,tooltip = "text")%>%
layout(xaxis = list(showspikes = T))