Skip to content

Commit 96f0d40

Browse files
committed
clean up comments
1 parent 5fa2434 commit 96f0d40

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

R/ggplotly.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ gg2list <- function(p){
111111
}
112112
}
113113

114-
## Test fill and color to see if they encode a quantitative
115-
## variable. This may be useful for several reasons: (1) it is
116-
## sometimes possible to plot several different colors in the same
117-
## trace (e.g. points), and that is faster for large numbers of
118-
## data points and colors; (2) factors on x or y axes should be
119-
## sent to plotly as characters, not as numeric data (which is
120-
## what ggplot_build gives us).
114+
# Test fill and color to see if they encode a quantitative
115+
# variable. This may be useful for several reasons: (1) it is
116+
# sometimes possible to plot several different colors in the same
117+
# trace (e.g. points), and that is faster for large numbers of
118+
# data points and colors; (2) factors on x or y axes should be
119+
# sent to plotly as characters, not as numeric data (which is
120+
# what ggplot_build gives us).
121121
misc <- list()
122122
for(a in c("fill", "colour", "x", "y", "size")){
123123
for(data.type in c("continuous", "date", "datetime", "discrete")){

R/trace_generation.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ toBasic <- list(
363363
g
364364
},
365365
bar=function(g) {
366-
## TODO: why is this here? bar is a basic geom.
367366
for(a in c("fill", "colour")){
368367
g$prestats.data[[a]] <-
369368
g$data[[a]][match(g$prestats.data$group, g$data$group)]
@@ -389,13 +388,11 @@ toBasic <- list(
389388
g
390389
},
391390
abline=function(g) {
392-
## TODO: why not treat abline as a basic path?
393391
g$params$xstart <- min(g$prestats.data$globxmin)
394392
g$params$xend <- max(g$prestats.data$globxmax)
395393
g
396394
},
397395
hline=function(g) {
398-
## TODO: why not treat hline as a basic path?
399396
if (is.factor(g$data$x)) {
400397
g$params$xstart <- as.character(sort(g$data$x)[1])
401398
g$params$xend <- as.character(sort(g$data$x)[length(g$data$x)])
@@ -406,13 +403,11 @@ toBasic <- list(
406403
g
407404
},
408405
vline=function(g) {
409-
## TODO: why not treat vline as a basic path?
410406
g$params$ystart <- min(g$prestats.data$globymin)
411407
g$params$yend <- max(g$prestats.data$globymax)
412408
g
413409
},
414410
point=function(g) {
415-
## TODO: why is this code here? point is a basic geom.
416411
if ("size" %in% names(g$data)) {
417412
g$params$sizemin <- min(g$prestats.data$globsizemin)
418413
g$params$sizemax <- max(g$prestats.data$globsizemax)

0 commit comments

Comments
 (0)