Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
線種スケールで、グラフの特定の値をスキップするにはどうすればよいですか? 値 2 と 3 は私の好みにはあまりにも似ているので、そのうちの 1 つをスキップして、代わりに 0、1、2、および 4 を使用したいと思います。
値を使用scale_linetype_manual()および設定できます。
scale_linetype_manual()
df=data.frame(x=rnorm(100),y=rnorm(100),group=rep(c("a","b","c","d"),each=25)) ggplot(df,aes(x,y,group=group))+ geom_line(aes(linetype=group))+ scale_linetype_manual(values=c(6,1,2,4))