diff --git a/src/plotting/MarginalDist.jl b/src/plotting/MarginalDist.jl index 319c28372..973f189e9 100644 --- a/src/plotting/MarginalDist.jl +++ b/src/plotting/MarginalDist.jl @@ -29,8 +29,9 @@ function bat_marginalize( normalize ? hist = StatsBase.normalize(hist) : nothing uvbd = EmpiricalDistributions.UvBinnedDist(hist) + marg = MarginalDist((idx,), uvbd, varshape(maybe_shaped_samples)) - return MarginalDist((idx,), uvbd, varshape(maybe_shaped_samples)) + return (result = marg, ) end @@ -59,8 +60,9 @@ function bat_marginalize( normalize ? hist = StatsBase.normalize(hist) : nothing mvbd = EmpiricalDistributions.MvBinnedDist(hist) + marg = MarginalDist(idxs, mvbd, varshape(maybe_shaped_samples)) - return MarginalDist(idxs, mvbd, varshape(maybe_shaped_samples)) + return (result = marg, ) end @@ -80,8 +82,9 @@ function bat_marginalize( normalize ? hist = StatsBase.normalize(hist) : nothing uvbd = EmpiricalDistributions.UvBinnedDist(hist) + marg = MarginalDist((idx,), uvbd, varshape(prior)) - return MarginalDist((idx,), uvbd, varshape(prior)) + return (result = marg, ) end @@ -103,8 +106,9 @@ function bat_marginalize( normalize ? hist = StatsBase.normalize(hist) : nothing mvbd = EmpiricalDistributions.MvBinnedDist(hist) + marg = MarginalDist(idxs, mvbd, varshape(prior)) - return MarginalDist(idxs, mvbd, varshape(prior)) + return (result = marg, ) end @@ -132,5 +136,7 @@ function bat_marginalize( EmpiricalDistributions.MvBinnedDist(hist) end - return MarginalDist(parsel, bd, original.origvalshape) + marg = MarginalDist(parsel, bd, original.origvalshape) + + return (result = marg, ) end diff --git a/src/plotting/recipes_MarginalDist_1D.jl b/src/plotting/recipes_MarginalDist_1D.jl index f07c56b7b..a8afc419d 100644 --- a/src/plotting/recipes_MarginalDist_1D.jl +++ b/src/plotting/recipes_MarginalDist_1D.jl @@ -21,7 +21,7 @@ end ) indx = asindex(origmarg, parsel) - marg = bat_marginalize(origmarg, (indx, )) + marg = bat_marginalize(origmarg, (indx, )).result hist = marg.dist.h normalize ? hist=StatsBase.normalize(hist) : nothing diff --git a/src/plotting/recipes_prior.jl b/src/plotting/recipes_prior.jl index 5001a0391..8823e81e6 100644 --- a/src/plotting/recipes_prior.jl +++ b/src/plotting/recipes_prior.jl @@ -28,7 +28,7 @@ nsamples = nsamples, closed = closed, normalize = normalize - ) + ).result xlabel = if isa(parsel, Symbol) || isa(parsel, Expr) "$parsel" @@ -96,7 +96,7 @@ end nbins = bins, closed = closed, normalize = normalize - ) + ).result xlabel, ylabel = if isa(parsel, Symbol) || isa(parsel, Expr) diff --git a/src/plotting/recipes_samples_1D.jl b/src/plotting/recipes_samples_1D.jl index 1841eb9ea..d907dff6e 100644 --- a/src/plotting/recipes_samples_1D.jl +++ b/src/plotting/recipes_samples_1D.jl @@ -28,7 +28,7 @@ closed = closed, filter = filter, normalize = normalize - ) + ).result orientation = get(plotattributes, :orientation, :vertical) (orientation != :vertical) ? swap=true : swap = false diff --git a/src/plotting/recipes_samples_2D.jl b/src/plotting/recipes_samples_2D.jl index 02cd860a9..599fe3678 100644 --- a/src/plotting/recipes_samples_2D.jl +++ b/src/plotting/recipes_samples_2D.jl @@ -50,7 +50,7 @@ nbins = bins, closed = closed, filter = filter - ) + ).result if seriestype == :scatter base_markersize = get(plotattributes, :markersize, 1.5)