开发者

Can I use shingles from lattice in ggplot2 in R

开发者 https://www.devze.com 2023-02-15 02:04 出处:网络
It is possible to use the shingles to define specific ranges in ggplot2.As far as i understand shingles are a way to generate groups.Can we create such shingles and use them in ggp开发者_如何学运维lot

It is possible to use the shingles to define specific ranges in ggplot2. As far as i understand shingles are a way to generate groups. Can we create such shingles and use them in ggp开发者_如何学运维lot2 facet_grid to obtain graphs?


Following up from the comments, ggplot can't draw shingles (in the way lattice draws shingles with special indicators in the strip) and by default doesn't have a means of producing the overlapping groups.

However, I cam across this excellent PDF document which aims to produce a gpplot2 version of every figure in Depayan's excellent Lattice book (Lattice: Multivariate Data Visualization with R).

Page 31 contains a custom function fn() which replicates the behaviour of equal.count(), as far as I can tell, to provide the correct data structure to plot with overlapping shingles. The PDF contains plenty of examples of "shingles" in ggplot that you can play with.

So not sure if this answers the Q - but at least it appears one can fudge ggplot into producing plots that use the shingle concept.

0

精彩评论

暂无评论...
验证码 换一张
取 消