r语言的散点图不散怎么办_R:如何在R中的散点图的“点”上重叠饼图

Using R I would like to replace the points in a 2d scatter plot by a pie chart displaying additional values.

The rational behind is that I have time series data for hundreds of elements (proteins) derived from a biological experiment monitored for 4 conditions. I would like to plot the elements (categorial data) on the y axis and occurrence of a event in time on the x axis. To visualize the relative occurrence between the 4 conditions I would like to visualize this in form of a pie chart or doughnut chart overplayed onto the respective point in the scatter plot.

The overall data density is low so overlapping won't be an issue.

Is this possible in R?

I was thinking of using a manual scale in ggplot2 but could not figure out how to define a pie chart as a scale.

Also of interest would be how to best cluster this data and sort it accordingly.

解决方案

Yes. pieGlyph() is one ready-to-go function from the Rgraphviz package.

Also, I would check out this Q/A for how to do things like this more generally:

Especially check out ?my.symbols from the TeachingDemos package.

Lastly, in regards to ggplot2, you should check out this blog post about possible upcoming features:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值