1

I am trying to recreate a figure similar to the attached plot (similar to the target plot). enter image description here

I have found certain topics that are similar (e.g. one 3D plot comprising stacked 2D plots (How can I make 3d plot with stacked 2d plot?) or plotting mean for density distributions (plot median values on top of a density distribution in ggplot2)).

But I was unable to find an example in which there is a 3D plot of stacked 2D plots and, in addition, there is a plot of showing the relationship between the mean values of the said stacked 2D plots.

Thanks

alistaire
  • 42,459
  • 4
  • 77
  • 117
aa5
  • 11
  • 3
  • 2
    ggplot2 doesn't do 3d plotting. I have read that there are no plans to change than. Bothe base plotting and lattice plotting can do it. For a coding answer you need to provid data. – IRTFM Jan 31 '19 at 01:42
  • 3
    it's called a ridgeplot I guess, https://cran.r-project.org/web/packages/ggridges/vignettes/introduction.html see that package: ggridges – lemairev Jan 31 '19 at 02:03
  • 1
    I think it's *possible* to hack this in ggplot2 / ggridges, & shift the individual density lines to simulate 3D positions (I've hacked [worse](https://stackoverflow.com/q/45862606/8449629)), but unless you have strong reasons to do so, using one of the alternative plotting packages would probably be simpler. – Z.Lin Jan 31 '19 at 07:09

0 Answers0