![](/img/trans.png)
[英]R, package vcd, mosaic(): How to substitute mosaic plot shading colours for patterns
[英]How to tell mosaic (mosaic plot, R, VCD package) to always print the p value even when using residual shading?
我认为最好的方法是使用默认包含 p 值的不同着色器(如 shading_hcl),然后修改该着色器的颜色( https://rdrr.io/cran/vcd/src/R /阴影.R )
因此,要让您的示例使用该新着色器:
cars <- table(mtcars$gear, mtcars$carb)
mosaic(cars, gp = shading_hcl(observed=cars, eps=0.01, lty=1:2, h=c(260,0), c=c(200, 200), l=c(90, 50)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.