ggplot(df,aes(cut,x,fill=cut))+ geom_flat_violin()+ theme(legend.position="none") 输出: 示例2:水平半小提琴情节 让我们看看使用 coord_flip() 函数水平对齐半小提琴图。 R实现 # Horizontal half violin plot ggplot(df,aes(cut,x,fill=cut))+ geom_flat_violin()+coord_flip()+ theme(legend....
ggplot(ldt_long, aes(x = "", y = rt, fill = language)) + introdataviz::geom_flat_violin(trim=FALSE, alpha = 0.4, position = position_nudge(x = rain_height+.05)) + geom_point(aes(colour = language), size = 2, alpha = .5, show.legend = FALSE, position = position_jitter(w...
R语言ggplot2绘制云雨图 #定于函数library(ggplot2)library(dplyr)"%||%"<-function(a,b){if(!is.null(a))aelseb}geom_flat_violin<-function(mapping=NULL,data=NULL,stat="ydensity",position="dodge",trim=TRUE,scale="area",show.legend=NA,inherit.aes=TRUE,...){layer(data=data,mapping=mapping...
y = value)) + geom_flat_violin(col = "red", fill = "red", alpha = 0.3) + geom_point() + geom_flat_violin(data = tibble(value = rnorm(10000, mean = 10), key = "a"), fill = "blue", alpha = 0.2)
geom_line 密度:geom_density 云雨:geom_flat_violin, gghalves::geom_half_violin 箱线:geom_boxplot 小提琴:geom_violin 热力图(方块):geom_tile 人体/动物解剖图:gganatogram 划线:geom_segment, geom_vline, geom_hline, geom_abline 文本:annotate, labs, geom_text (文本), geom_label (矩形) 置信...
geom-pointrange.R geom-polygon.R geom-quantile.R geom-raster.R geom-rect.R geom-ribbon.R geom-rug.R geom-segment.R geom-sf.R geom-smooth.R geom-spoke.R geom-text.R geom-tile.R geom-violin.R geom-vline.R ggplot-global.R ggplot2-package.R ggproto.R grob-absolute.R grob-dot...
rm geom_flat_violin Jan 4, 2020 gglayer.Rproj geom_cake from yyplot Nov 8, 2018 geom_cake https://guangchuangyu.github.io/cn/2017/12/geom-cake/ geom_ord_ellipse https://guangchuangyu.github.io/cn/2018/01/geom-ord-ellipse/ geom_segment_c ...
geom-path.r geom-point.r geom-pointrange.r geom-polygon.r geom-quantile.r geom-raster.r geom-rect.r geom-ribbon.r geom-rug.r geom-segment.r geom-smooth.r geom-spoke.r geom-text.r geom-tile.r geom-violin.r geom-vline.r ggplot2.r ggproto.r grob-absolute.r grob-dotstack.r gr...
#巫山云雨图 p<-ggplot(iris,aes(Species,Sepal.Length))p+geom_flat_violin(aes(fill=Species),position=position_nudge(x=.25))+geom_jitter(aes(color=Species),width=0.1)+geom_boxplot(width=.1,position=position_nudge(x=0.2),fill="white",size=0.5,color='black')+coord_flip()...