Skip to content

Commit 8df6cc6

Browse files
committed
eliminate use of univariate qplot()
1 parent 6bb523f commit 8df6cc6

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

R/helpers.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ hide_legend <- function(p) {
144144
#' @examples
145145
#'
146146
#' # currently no bargl trace type
147-
#' toWebGL(qplot(1:10))
147+
#' toWebGL(ggplot() + geom_bar(aes(1:10)))
148148
#' toWebGL(qplot(1:10, 1:10))
149149
#'
150150
toWebGL <- function(p) {

inst/examples/rmd/printing/index.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The `api_create()` function also understands how to "upload" ggplot2/plotly obje
4747

4848

4949
```{r}
50-
p <- api_create(qplot(1:10))
50+
p <- api_create(qplot(1:10, 1:10))
5151
p
5252
```
5353

man/toWebGL.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ save_outputs <- function(gg, name) {
9292
ggFile <- paste("ggplot", filename, sep = "-")
9393
res <- tryCatch(ggsave(ggFile, gg),
9494
error = function(e) {
95-
err <- qplot() +
95+
err <- ggplot() +
9696
annotate('text', label = paste('Error:', e$message),
9797
x = 1, y = 1, color = 'red')
9898
ggsave(ggFile, err, width = 3, height = 2, units = 'in')
9999
})
100100
img <- function(x, f) {
101101
tryCatch(plotly_IMAGE(x, out_file = f, width = 300, height = 400),
102102
error = function(e) {
103-
err <- qplot() +
103+
err <- ggplot() +
104104
annotate('text', label = paste('Error:', e$message),
105105
x = 1, y = 1, color = 'red')
106106
# TODO: convert pixels to inches?

tests/testthat/test-api.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,7 @@ test_that("Can create plots with non-trivial src attributes", {
140140
expect_srcified(trace$marker$colorsrc)
141141

142142
# can src-ify layout.xaxis.tickvals
143-
res <- api_create(qplot(1:10))
143+
res <- api_create(ggplot() + geom_bar(aes(1:10)))
144144
expect_srcified(res$figure$layout$xaxis$tickvalssrc)
145145

146146
})
147-
148-
149-

0 commit comments

Comments
 (0)