From c26e5cf940b7af8fda2bb7ec69caa03f1af73076 Mon Sep 17 00:00:00 2001 From: David Widmann Date: Tue, 22 Feb 2022 19:55:06 +0100 Subject: [PATCH] Fix plot labels (#353) --- Project.toml | 2 +- src/plot.jl | 4 ++-- test/plot_test.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 48bb934b..9eb990c4 100644 --- a/Project.toml +++ b/Project.toml @@ -3,7 +3,7 @@ uuid = "c7f686f2-ff18-58e9-bc7b-31028e88f75d" keywords = ["markov chain monte carlo", "probablistic programming"] license = "MIT" desc = "Chain types and utility functions for MCMC simulations." -version = "5.0.3" +version = "5.0.4" [deps] AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001" diff --git a/src/plot.jl b/src/plot.jl index 382274c1..1eb4131d 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -39,11 +39,11 @@ const supportedplots = push!(collect(keys(translationdict)), :mixeddensity, :cor if colordim == :parameter title --> "Chain $(MCMCChains.chains(c)[i])" - label --> string.(names(c)) + label --> permutedims(map(string, names(c))) val = c.value[:, :, i] elseif colordim == :chain title --> string(names(c)[i]) - label --> map(x -> "Chain $x", MCMCChains.chains(c)) + label --> permutedims(map(x -> "Chain $x", MCMCChains.chains(c))) val = c.value[:, i, :] else throw(ArgumentError("`colordim` must be one of `:chain` or `:parameter`")) diff --git a/test/plot_test.jl b/test/plot_test.jl index 719ee790..860f383f 100644 --- a/test/plot_test.jl +++ b/test/plot_test.jl @@ -70,4 +70,4 @@ Logging.disable_logging(Logging.Warn) end # Reset log level. -Logging.disable_logging(level) \ No newline at end of file +Logging.disable_logging(level)