怎样才能情节3D叠加柱状图在研发?情节、柱状图

由网友(邂逅相遇、与子偕藏)分享简介:我想绘制在研发堆积直方图;即堆叠在第三维单个直方图。I want to plot stacked histograms in R; i.e. stack individual histograms in the third dimension.感谢大家的建议,尤其是一个接巴蒂尔。thank you all for...

我想绘制在研发堆积直方图;即堆叠在第三维单个直方图。

I want to plot stacked histograms in R; i.e. stack individual histograms in the third dimension.

感谢大家的建议,尤其是一个接巴蒂尔。

thank you all for your suggestions, especially the one by Shane.

@hadley,我同意你的观点,但是,我的情况就不同了:主穴我想通过绘制4堆叠柱状图传达的是,尾部变化显著....,将获得遮蔽的部分在数据没有结果我presenting ....还能够读取频率轴上也并不重要,因为我将绘制的相对频率...

@hadley, I agree with your points, however, my situation is different: the main point I'm trying to convey by plotting four stacked histograms is that the tails vary significantly....the part that will get obscured is of no consequence in the data I'm presenting....also, being able to read the frequency axis is also not important since I'll be plotting the relative frequencies...

推荐答案

您可以尝试使用任何 RGL (看到这里)或者 3dscatterplot (如< A HREF =htt​​p://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=116相对=nofollow>在这个例子中)。莱迪思还支持这样的:

You could try using either rgl (see here) or 3dscatterplot (as in this example). Lattice also supports this:

library(lattice) 
library(latticeExtra) 
?panel.3dbars

您可以看到这样的例子在Learnr博客。

You can see an example of this on the Learnr blog.

我不相信这是一个技术上叠加柱状图(一叠加柱状图堆栈的酒吧在彼此的顶部)。此外,不同类型的直方图可以更翔实:看的 GGPLOT2 这里一些实例文档。

I don't believe that's technically a stacked histogram (a stacked histogram stacks the bars on top of each other). Moreover, a different kind of histogram could be more informative: look at the ggplot2 the documentation here for some examples.

 hist_cut <- ggplot(diamonds, aes(x=price, fill=cut)) 
 hist_cut + geom_bar() # defaults to stacking 

另一种选择是使用网络化,而不是与 facet_wrap 在GGPLOT2(见这个帖子作为一个例子)。

Another option is to use latticing instead, with facet_wrap in ggplot2 (see this post as an example).

阅读全文

相关推荐

最新文章