-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.Rhistory
44 lines (44 loc) · 1.92 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
faithful
data = faithful
library(ggplot2)
data = faithfuld
data = faithful
data = faithfuld
setwd("~/git/cxplot")
write.table(data, file="faithful.csv", sep=",")
source("~/git/cxplot/cxplot.R")
cxplot(ggplot(faithful, aes(x = eruptions, y = waiting)) + geom_point() + xlim(0.5, 6) + ylim(40, 110) + geom_density_2d())
cxplot(ggplot(faithful, aes(x = eruptions, y = waiting)) + geom_density_2d())
cxplot(ggplot(faithful, aes(x = eruptions, y = waiting)) + geom_density_2d())
library(interp)
data(franke, package = "interp")
origdata <- as.data.frame(interp::franke.data(1, 1, franke))
grid <- with(origdata, interp::interp(x, y, z))
griddf <- subset(data.frame(x = rep(grid$x, nrow(grid$z)),
y = rep(grid$y, each = ncol(grid$z)),
z = as.numeric(grid$z)), !is.na(z))
cxplot(ggplot(griddf, aes(x, y, z = z)) + geom_contour_filled() + geom_point(data = origdata))
library(interp)
install.packages("interp")
library(interp)
data(franke, package = "interp")
origdata <- as.data.frame(interp::franke.data(1, 1, franke))
grid <- with(origdata, interp::interp(x, y, z))
griddf <- subset(data.frame(x = rep(grid$x, nrow(grid$z)),
y = rep(grid$y, each = ncol(grid$z)),
z = as.numeric(grid$z)), !is.na(z))
cxplot(ggplot(griddf, aes(x, y, z = z)) + geom_contour_filled() + geom_point(data = origdata))
cxplot(ggplot(griddf, aes(x, y, z = z)) + geom_contour_filled() + geom_point(data = origdata))
write.table(origdata, file = "origdata", sep=",")
write.table(griddf, file = "griddf.csv", sep=",")
write.table(origdata, file = "origdata.csv", sep=",")
cxplot(ggplot(faithful, aes(x = eruptions, y = waiting)) + geom_density_2d())
faithful$eruptions
faithful$waiting
write.table(faithful, file = "faithful.csv", sep=",")
dsmall <- diamonds[sample(nrow(diamonds), 1000), ]
write.table(dsmall, file = "dsmall.csv", sep=",")
cxplot(ggplot(diamonds, aes(carat)) + geom_histogram())
cxplot(ggplot(diamonds, aes(carat)) + geom_histogram())
View(cx_geom_quantile)
View(cx_geom_raster)