4D Scatterplot: Plots' respective sizes based on frequencies

31 views Asked by At

Assuming we have this reproducible dataframe:

set.seed(949494)

Rating_1 <- round(runif(50, 1, 5))
Rating_2 <- round(runif(50, 1, 5))
Rating_3 <- round(runif(50, 1, 5))
ID <- rep(c("H", "G"), 25)
Quality <- Rating_1 * Rating_2 * Rating_3

DF <- data.frame(ID, Rating_1, Rating_2, Rating_3, Quality)

We want to see this in a scatterplot with 3-axes:

# Plotly scatter3d plot
plot_ly(DF, x = ~Rating_1, y = ~Rating_2, z = ~Rating_3,
        color = ~Quality, type = "scatter3d", mode = "markers",
        marker = list(symbol = "circle")) %>%
  add_markers(text = ~paste("Quality:", Quality)) %>%
  layout(scene = list(xaxis = list(title = "Novel"),
                      yaxis = list(title = "Benefit"),
                      zaxis = list(title = "Feasible")),
         title = "Quality Of Ideas")

How can I make the circles increase in size based directly on the frequency? If there are multiple on the exact same spot, I'd like to see it based on the size of the circle.

0

There are 0 answers