0

I am attempting to produce an interactive scatterplot matrix as follows:

library(GGally)
library(ggplot2)
library(plotly)
dat <- mtcars[,1:3]

p <- ggpairs(dat)
ggplotly(p)

The only change I am aiming to make is to only render the bottom left three plots interactive. The other subplots (especially the diagonals) have a lot of interactive information. When I make the data set substantially larger, I believe the interactive capabilities of the diagonal subplots slow it all down. So, my main motivation in rendering the diagonal subplots static is to allow for this interactive scatterplot matrix to be used for large datasets effectively.

My questions are: Would rendering the diagonal subplots static make the interactive graphic faster? And if so, what might be an approach to go about achieving that? Thank you.

  • it is giving me error `> ggplotly(p) Error in gg2list(p, width = width, height = height, tooltip = tooltip, : attempt to apply non-function` – Hardik Gupta Jan 10 '17 at 15:20

1 Answers1

0

Try it out

what might be an approach to go about achieving that?

library(GGally)
library(ggplot2)
library(plotly)
dat <- mtcars[,1:3]

p <- ggpairs(dat)
pp <- ggplotly(p)
for (x in c(1,4,5,7:9)) pp$x$data[[x]]$hoverinfo <- "none" 
pp
lukeA
  • 53,097
  • 5
  • 97
  • 100