Skip to content

Commit a1f2b07

Browse files
committed
rm unnecessary imports
1 parent ec1827d commit a1f2b07

File tree

7 files changed

+0
-42
lines changed

7 files changed

+0
-42
lines changed

tests/cookbook-test-suite/axes.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
library(plotly)
2-
set_credentials_file("ggplot2-cookbook", "gzcn4660jr")
3-
py <- plotly();
4-
5-
library(ggplot2)
6-
71
bp <- ggplot(PlantGrowth, aes(x=group, y=weight)) + geom_boxplot()
82

93
bp1 <- bp + coord_flip()

tests/cookbook-test-suite/bars_and_lines.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
library(plotly)
2-
set_credentials_file("ggplot2-cookbook", "gzcn4660jr")
3-
py <- plotly();
4-
51
df <- data.frame(time = factor(c("Lunch","Dinner"), levels=c("Lunch","Dinner")),
62
total_bill = c(14.89, 17.23))
73
# time total_bill
84
# Lunch 14.89
95
# Dinner 17.23
106

11-
# Load the ggplot2 library
12-
library(ggplot2)
13-
147
# Very basic bar graph
158
g <- ggplot(data=df, aes(x=time, y=total_bill)) + geom_bar(stat="identity")
169
save_outputs(g, 'bars-and-lines/basic-bar')

tests/cookbook-test-suite/distributions.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
library(plotly)
2-
set_credentials_file("ggplot2-cookbook", "gzcn4660jr")
3-
py <- plotly();
4-
51
set.seed(1234)
62
df <- data.frame(cond = factor( rep(c("A","B"), each=200) ),
73
rating = c(rnorm(200),rnorm(200, mean=.8)))
@@ -14,8 +10,6 @@ df <- data.frame(cond = factor( rep(c("A","B"), each=200) ),
1410
# B 0.8146431
1511
# B -0.1164891
1612

17-
library(ggplot2)
18-
1913

2014
# Basic histogram from the vector "rating". Each bin is .5 wide.
2115
# These both do the same thing:

tests/cookbook-test-suite/legends.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
library(plotly)
2-
set_credentials_file("ggplot2-cookbook", "gzcn4660jr")
3-
py <- plotly();
4-
5-
library(ggplot2)
61
bp <- ggplot(data=PlantGrowth, aes(x=group, y=weight, fill=group)) + geom_boxplot()
72

83
# Remove legend for a particular aesthetic (fill)

tests/cookbook-test-suite/lines.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
library(plotly)
2-
set_credentials_file("ggplot2-cookbook", "gzcn4660jr")
3-
py <- plotly();
4-
51
# Some sample data
62
df <- read.table(header=T, text='
73
cond result
84
control 10
95
treatment 11.5
106
')
117

12-
library(ggplot2)
13-
148
# Basic bar plot
159
bp <- ggplot(df, aes(x=cond, y=result)) + geom_bar(position=position_dodge())
1610
bp

tests/cookbook-test-suite/means_and_error_bars.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
library(plotly)
2-
set_credentials_file("ggplot2-cookbook", "gzcn4660jr")
3-
py <- plotly();
4-
51
df <- ToothGrowth
62
# len supp dose
73
# 4.2 VC 0.5
@@ -10,8 +6,6 @@ df <- ToothGrowth
106
# 29.4 OJ 2
117
# 23.0 OJ 2
128

13-
library(ggplot2)
14-
159
# summarySE provides the standard deviation, standard error of the mean, and a (default 95%) confidence interval
1610

1711
## Summarizes data.

tests/cookbook-test-suite/scatterplots.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
library(plotly)
2-
set_credentials_file("ggplot2-cookbook", "gzcn4660jr")
3-
py <- plotly();
4-
51
set.seed(955)
62
# Make some noisily increasing data
73
dat <- data.frame(cond = rep(c("A", "B"), each=10),
@@ -14,8 +10,6 @@ dat <- data.frame(cond = rep(c("A", "B"), each=10),
1410
# B 17.793359218 19.718587761
1511
# B 19.319909163 19.647899863
1612

17-
library(ggplot2)
18-
1913
g <- ggplot(dat, aes(x=xvar, y=yvar)) +
2014
geom_point(shape=1) # Use hollow circles
2115
save_outputs(g, 'scatterplots/scatterplots with hollow circles')

0 commit comments

Comments
 (0)