Skip to content

Commit 5cf9a3c

Browse files
committed
delete print.trace and trace class
1 parent 7f8ad6c commit 5cf9a3c

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

R/ggplotly.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ gg2list <- function(p){
180180
# scale_reverse multiples x/y data by -1, so here we undo that so
181181
# that the actual data can be uploaded to plotly.
182182
replace.aes <- intersect(names(prestats), reverse.aes)
183-
for(a in replace.aes){
183+
for (a in replace.aes) {
184184
prestats[[a]] <- -1 * prestats[[a]]
185185
}
186186
misc$prestats.data <-
@@ -312,12 +312,12 @@ gg2list <- function(p){
312312
sc <- p$scales$scales[[scale.i]]
313313
trace.order.list[[xy]] <- sc$limits
314314
trace.name.map[sc$breaks] <- sc$labels
315-
if(is.null(sc$breaks)){
315+
if (is.null(sc$breaks)) {
316316
ax.list$showticklabels <- FALSE
317317
ax.list$showgrid <- FALSE
318318
ax.list$ticks <- ""
319319
}
320-
if(is.numeric(sc$breaks)){
320+
if (is.numeric(sc$breaks)) {
321321
dticks <- diff(sc$breaks)
322322
dt <- dticks[1]
323323
if(all(dticks == dt)){
@@ -631,7 +631,7 @@ gg2list <- function(p){
631631
layout$legend$bgcolor <- toRGB(s(rect_fill))
632632
}
633633

634-
if(length(trace.list) == 0) {
634+
if (length(trace.list) == 0) {
635635
stop("No exportable traces")
636636
}
637637

R/print.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
print.trace <- function(x, ...){
2-
str(x)
3-
invisible(x)
4-
}

R/trace_generation.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ layer2traces <- function(l, d, misc) {
203203
data.params <- data.list[[data.i]]
204204
data.params$params$stat.type <- l$stat$objname
205205
tr <- do.call(getTrace, data.params)
206-
class(tr) <- "trace"
207206
for (v.name in c("x", "y")) {
208207
vals <- tr[[v.name]]
209208
if (length(vals) > 0 && is.na(vals[length(vals)])) {

0 commit comments

Comments
 (0)