1

I have a data frame that looks like this but larger:

surv        line    stage   temp    col
0.96144958  149     Adult   18C     white
0.9775      208     Adult   18C     black
0.779635363 301     Adult   18C     blue
0.43        149     Larva   18C     white
0.44        208     Larva   18C     black
0.64        301     Larva   18C     blue
0.908474529 149     Adult   25C     white
0.878126935 208     Adult   25C     black
0.086346749 301     Adult   25C     blue
0.24        149     Larva   25C     white
0.0875      208     Larva   25C     black
0.22        301     Larva   25C     blue

Where surv is survival, line is a experimental unit distinction and grouping variable, stage is a life stage, temp is an experimental condition, and col is a color assigned to each line for graphic purposes.

I have made 2D reaction norms (line plots) that show difference of survival across temp or stage, however, I would like to create a 3D one. So far, I have done this:

3D reaction plot

with the following code in R using the package, plotly:

plot_ly(dat_lva, x = ~stage, y = ~temp, z = ~surv, color= ~line, colors = ~col, mode=c("marker","line"))

The main issue is that the lines are going diagonally instead of around the perimeter of the cube. Both would be nice to look at but I am chiefly concerned about the outer connections. I am assuming that putting modes "marker" and "line" isn't the way to do this but it is a work around at this point.

Uwe
  • 41,420
  • 11
  • 90
  • 134
Melderon
  • 365
  • 1
  • 16

0 Answers0