Thursday, 13 December 2018

Scatter Plot with 10,000 Observations

> n <- 10000
> c1 <- matrix(rnorm(n, mean=0, sd=.5), ncol=2)
> c2 <- matrix(rnorm(n, mean=3, sd=2), ncol=2)
> mydata <- rbind(c1, c2)
> mydata <- as.data.frame(mydata)
> names(mydata) <- c("x", "y")
> (mydata,
> with(mydata,
+      plot(x, y, pch=19, main="Scatter Plot with 10,000 Observations"))
> with(mydata,
+      plot(x, y, pch=15, main="Scatter Plot with 10,000 Observations"))
> with(mydata,
+      smoothScatter(x, y, main="Scatterplot Colored by Smoothed Densities"))




No comments:

Post a comment

Intersection of subring

How to prove the intersection of two subrings is a subring? Let S1 and S2  be two subrings of a ring R. Then S1∩S2 is not empty since ...