diff --git a/docs/make.jl b/docs/make.jl index 016bb51..e3a8fc7 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,12 +5,7 @@ using Plots DocMeta.setdocmeta!(MCMCTesting, :DocTestSetup, :(using MCMCTesting); recursive=true) makedocs(; - modules=[ - MCMCTesting, - isdefined(Base, :get_extension) ? - Base.get_extension(MCMCTesting, :MCMCTestingPlotsExt) : - RecipesBase.apply_recipe - ], + modules=[MCMCTesting,], repo="https://github.com/Red-Portal/MCMCTesting.jl/blob/{commit}{path}#{line}", sitename="MCMCTesting.jl", format=Documenter.HTML(; diff --git a/docs/src/ranksim.md b/docs/src/ranksim.md index 1fc4707..0bfa115 100644 --- a/docs/src/ranksim.md +++ b/docs/src/ranksim.md @@ -13,7 +13,7 @@ simulate_ranks ## Visualizing Ranks with `Plots` We provide a `Plots` recipe for visualizing the ranks: -```docs +```@docs rankplot ``` @@ -22,7 +22,7 @@ This can be used as follows: using Plots using MCMCTesting -# Set up the simulation +# Set the simulation here ranks = simulate_ranks(test, subject) rankplot(test, ranks; param_names) diff --git a/src/MCMCTesting.jl b/src/MCMCTesting.jl index c212fdc..e76a697 100644 --- a/src/MCMCTesting.jl +++ b/src/MCMCTesting.jl @@ -12,7 +12,7 @@ export mcmctest, seqmcmctest, simulate_ranks, - RankPlot + rankplot using HypothesisTests using MultipleTesting diff --git a/src/rankplot.jl b/src/rankplot.jl index a4000f8..981219b 100644 --- a/src/rankplot.jl +++ b/src/rankplot.jl @@ -5,16 +5,18 @@ Plot the simulated ranks using `simulate_ranks`. !!! info - `Plots` must be imported *before* `MCMCTesting` to use this plot recipe. + `Plots` must be imported to use this plot recipe. # Arguments -- test::ExactRankTest: The exact rank test object used to simulate the ranks. -- ranks: The output of `simulate_rank`. +- `test::ExactRankTest`: The exact rank test object used to simulate the ranks. +- `ranks`: The output of `simulate_rank`. # Keyword Arguments -- stats_names: The name for the statistics used in the rank simulation. The default argument automatically assign default names. (Default: :auto). +- `stats_names`: The name for the statistics used in the rank simulation. The default argument automatically assign default names. (Default: :auto). - Keyword arguments corresponding `Plots` attributes, such as `bins`, `layout`, `size`, may apply. """ +function rankplot end + @userplot RankPlot @recipe function f(h::RankPlot; stat_names = :auto) if length(h.args) != 2 || !(typeof(h.args[1]) <: ExactRankTest)