Closed
Description
When researching for this question I noticed that example on Text and annotations page is not working for me.
a <- list()
for (i in seq_len(nrow(mtcars))) {
m <- mtcars[i, ]
a[[i]] <- list(
x = m$wt,
y = m$mpg,
text = rownames(m),
xref = "x",
yref = "y",
showarrow = TRUE,
arrowhead = 7,
ax = 20,
ay = -40
)
}
plot_ly(mtcars, x = ~wt, y = ~mpg) %>%
add_markers() %>%
layout(annotations = a)
There is no plot (using RStudio) and if I save the (empty) png image, it's 800 kb of nothing but white.
Another interesting thing I noticed is that the plot doesn't render on the site, either. All other plots appear to work flawlessly. Is there something I'm missing?
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Slovenian_Slovenia.1250 LC_CTYPE=Slovenian_Slovenia.1250
[3] LC_MONETARY=Slovenian_Slovenia.1250 LC_NUMERIC=C
[5] LC_TIME=Slovenian_Slovenia.1250
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] plotly_4.5.2 ggplot2_2.1.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.5 tidyr_0.5.1 viridisLite_0.1.3 digest_0.6.9
[5] dplyr_0.5.0 assertthat_0.1 grid_3.3.1 plyr_1.8.4
[9] R6_2.1.2 jsonlite_0.9.22 gtable_0.2.0 DBI_0.4-1
[13] magrittr_1.5 scales_0.4.0 httr_1.2.0 lazyeval_0.2.0
[17] tools_3.3.1 htmlwidgets_0.7 purrr_0.2.2 munsell_0.4.3
[21] yaml_2.1.13 rsconnect_0.4.1.11 base64enc_0.1-3 colorspace_1.2-6
[25] htmltools_0.3.5 tibble_1.2
Metadata
Metadata
Assignees
Labels
No labels