xfim / ggmcmc

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

Allow custom facet_wrap layout #56

Closed kieranrcampbell closed 5 years ago

kieranrcampbell commented 8 years ago

Hello,

Big fan of the package so far. Could you change the facet_wrap in all the plotting from nrow = 1 to the default or as an optional setting? If I want to plot more than 5 parameters they quickly run off the edge of the plots so a grid layout would be helpful.

Thanks

Kieran

edwardabraham commented 7 years ago

I agree that being able to pass arguments through would be great. However, you can work around this by adding your own facet_wrap call to the ggs function. The facet variable is Parameter, so to get a density plot with four columns and a fixed layout the call is:

ggs_density(ggs(mc)) + facet_wrap(~ Parameter, ncol=4, scales="fixed")
xfim commented 5 years ago

The package philosophy is aligned with @edwardabraham 's idea to leave as much as the aesthetical presentation to ggplot's own functions.

This, however, must be completed with examples in the documentation. I have updated the documentation accordingly to show this specefic examples and others that may be of interest (3b838341e22e2093998ad3a35892592cd4551c87).