Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line1 <- list( type = "line", x0 = 0, x1 = 1, y0 = 0.5, y1 = 0.5, xref = "paper", yref = "paper", line = list(color = "#C3C4C6") ) line2 <- list( type = "line", x0 = 0, x1 = 1, y0 = 0.75, y1 = 0.75, xref = "paper", yref = "paper", line = list(color = "#C3C4C6") ) plotly_empty() %>% layout(shapes = line1) %>% layout(shapes = line2)
The text was updated successfully, but these errors were encountered:
This also appears to be a problem when accumulating shapes in subplot()?
subplot()
library(dplyr) library(plotly) set.seed(123) dat <- data.frame( a = rnorm(100), b = rnorm(100), c = rnorm(100), class = sample(c("g1", "g2", "g3"), 100, replace = TRUE), grp = sample(c("n", "o", "p", "q", "r"), 100, replace = TRUE)) plots <- dat %>% group_by(class) %>% do(plot = { plot_ly(., x = ~a, y = ~b, legendgroup = ~grp, showlegend = .$class[1] == "g1") %>% add_markers(color = ~grp) %>% layout( xaxis = list(showzeroline = FALSE), yaxis = list(showzeroline = FALSE), shapes = list( type = "line", x0 = 0, x1 = 0, y0 = 0, y1 = 1, xref = "paper", yref = "paper" ), list( type = "line", x0 = 0, x1 = 0, y0 = 0, y1 = 1, xref = "paper", yref = "paper" )) }) subplot(plots, nrows = 2, shareX = TRUE, shareY = TRUE)
Related https://community.rstudio.com/t/adding-borders-to-all-subplots-in-plotly-when-sharing-axes/30289
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: