Here are the codes:
Friday, March 1, 2013
Overlapping Histogram in R
While preparing a class exercise involving the use of overlaying of histogram, I searched Google on possible article or discussion on the said topic. Luckily, I found a blog where the author demonstrated an R function to create an overlapping histogram. However, a comment from a guy also showed the same output using transparency. Below were the sample codes that can be used to generate overlapping histogram in R as based on the blog and the viewers comment.
Here are the codes:
Here are the codes:
Subscribe to:
Post Comments (Atom)
Of course, for the transparency to have any effect, you would have to use an image file format that actually supports it, e.g. PNG or PDF. In R, you can do this easily using the png() or pdf() functions.
ReplyDeleteNice post! Love this, a very useful tool to have.
ReplyDeleteThanks!
Thanks Doug! I am happy that others like my post and found it useful.
DeleteHow about that we don't know the ylim for the two distributions? If they are different (the first one is less than the second)? Can we look the maximum ylim beforehand. Thanks.
ReplyDeleteRecently I've started working with R and I was looking for this.
ReplyDeleteThanks mate!
Titanium Hair dye - The Home of TITONIC-ART®
ReplyDeleteA unique blend of titanium and titanium nail silicon has the everquest titanium finest texture titanium for sale and micro touch trimmer the lowest heat on the tin! grade 23 titanium