plot_density_2d | R Documentation |
Produce a 2-d posterior density plot, using a combined hexbin and contour plot, including gradient coloring to show the relative density.
plot_density_2d(
data,
x,
y,
bins = 50,
levels = c(0.6826895, 0.9544997, 0.9973002)
)
data |
a CosmoSIS MCMC dataframe |
x |
the variable to be plotted on the x-axis |
y |
the variable to be plotted on the y-axis |
bins |
the numbers of bins for both 'x' and 'y' |
levels |
probability content to be included in each contour line |
a ggplot object
## Not run:
dirname <- system.file("extdata", "run20", package = "rcosmosis")
fglob <- file.path(dirname, "chain_metro_20_*.txt.xz")
samples <- read.metropolis.hastings(fglob)
dplyr::filter(samples, sample > 100) |> plot_density_2d(omega_m, sigma8_input)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.