diff --git a/src/coefplot.jl b/src/coefplot.jl index 60a02be..77d3aa7 100644 --- a/src/coefplot.jl +++ b/src/coefplot.jl @@ -1,6 +1,6 @@ """ coefplot(x::Union{MixedModel,MixedModelBootstrap}; kwargs...)::Figure - coefplot!(fig::$(Indexable), x::Union{MixedModel,MixedModelBootstrap}; + coefplot!(fig::$(Indexable), x::Union{MixedModel,MixedModelBootstrap}; kwargs...) coefplot!(ax::Axis, Union{MixedModel,MixedModelBootstrap}; conf_level=0.95, vline_at_zero=true, show_intercept=true, attributes...) @@ -13,8 +13,8 @@ Inestimable coefficients (coefficients removed by pivoting in the rank deficient The mutating methods return the original object. -!!! note - Inestimable coefficients (coefficients removed by pivoting in the rank deficient case) +!!! note + Inestimable coefficients (coefficients removed by pivoting in the rank deficient case) are excluded. """ function coefplot(x::Union{MixedModel,MixedModelBootstrap}; show_intercept=true, kwargs...) @@ -42,8 +42,7 @@ function coefplot!(ax::Axis, x::Union{MixedModel,MixedModelBootstrap}; xvals = ci.estimate xlabel = @sprintf "Estimate and %g%% confidence interval" conf_level * 100 - attributes = merge((; xlabel), attributes) - ax.xlabel = attributes.xlabel + ax.xlabel = xlabel scatter!(ax, xvals, y; attributes...) errorbars!(ax, xvals, y, xvals .- ci.lower, ci.upper .- xvals; diff --git a/src/ridge.jl b/src/ridge.jl index d2ad163..efd6f21 100644 --- a/src/ridge.jl +++ b/src/ridge.jl @@ -1,6 +1,6 @@ """ ridgeplot(x::Union{MixedModel,MixedModelBootstrap}; kwargs...)::Figure - ridgeplot!(fig::$(Indexable), x::Union{MixedModel,MixedModelBootstrap}; + ridgeplot!(fig::$(Indexable), x::Union{MixedModel,MixedModelBootstrap}; kwargs...) ridgeplot!(ax::Axis, Union{MixedModel,MixedModelBootstrap}; conf_level=0.95, vline_at_zero=true, show_intercept=true, attributes...) @@ -16,8 +16,8 @@ Setting `conf_level=missing` removes the markings for the highest density interv The mutating methods return the original object. -!!! note - Inestimable coefficients (coefficients removed by pivoting in the rank deficient case) +!!! note + Inestimable coefficients (coefficients removed by pivoting in the rank deficient case) are excluded. """ function ridgeplot(x::MixedModelBootstrap; show_intercept=true, kwargs...) @@ -36,7 +36,7 @@ end """ _color(s::Symbol) _color(p::Pair) - + Extract the color part out of either a color name or a `(color, alpha)` pair. """ _color(s) = s @@ -60,10 +60,10 @@ function ridgeplot!(ax::Axis, x::MixedModelBootstrap; attributes...) end - attributes = merge((; xlabel, color=:black), attributes) + attributes = merge((; color=:black), attributes) band_attributes = merge(attributes, (; color=(_color(attributes.color), 0.3))) - ax.xlabel = attributes.xlabel + ax.xlabel = xlabel df = transform!(DataFrame(x.β), :coefname => ByRow(string) => :coefname) filter!(:coefname => in(_coefnames(x; show_intercept)), df)