Below is the map, created using R, of earthquakes that hit the province:
Thursday, October 17, 2013
Mapping Earthquake in Bohol using R
Below is the map, created using R, of earthquakes that hit the province:
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Random numbers | |
h2<-rnorm(1000,4) | |
h1<-rnorm(1000,6) | |
# Histogram Grey Color | |
hist(h1, col=rgb(0.1,0.1,0.1,0.5),xlim=c(0,10), ylim=c(0,200), main="Overlapping Histogram") | |
hist(h2, col=rgb(0.8,0.8,0.8,0.5), add=T) | |
box() | |
# Histogram Colored (blue and red) | |
hist(h1, col=rgb(1,0,0,0.5),xlim=c(0,10), ylim=c(0,200), main="Overlapping Histogram", xlab="Variable") | |
hist(h2, col=rgb(0,0,1,0.5), add=T) | |
box() |
Subscribe to:
Posts (Atom)