xfim / ggmcmc

Graphical tools for analyzing Markov Chain Monte Carlo simulations from Bayesian inference
111 stars 31 forks source link

Choosing layout when plotting multiple parameters #61

Closed lindeloev closed 5 years ago

lindeloev commented 6 years ago

My plotting panel in Rstudio is quite small, rendering the graphs hard to read. See below. It would be very convenient to either (1) have an ncol argument to choose number of columns or (2) have an faceting argument which defaults to TRUE but could be set to FALSE so that one could do a manual +facet_wrap(~Parameter, ncol=3) or, say, a +facet_grid(chain~Parameter). I like solution 2 better.

image

ggmcmc is really great! I just discovered it a week ago and I am thrilled to get MCMC into the safe home of ggplot2!

xfim commented 5 years ago

As explained in #56 , I prefer to give the power back to ggplot2 instead of coding all options within ggmcmc. Therefore, I am trying to make an effort in documenting how ggmcmc combines with ggplot2 back. In this sense, I have updated the documentation (3b83834). But any other example that you have in your mind will be highly appreciated.

In your specific case you could do: ... + facet_wrap(~ Parameter, ncol = 4).

lindeloev commented 5 years ago

Thanks, that solves it and seems like the right approach. Closing.