From e8db0cdb378fe4f429f935221c4eb50b178b84a5 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 13 Feb 2025 15:46:49 +0100 Subject: Improve legend in parplots of multistart objects --- .../_snaps/multistart/parplot-for-dfop-sfo-fit.svg | 339 +++++++++++---------- tests/testthat/test_multistart.R | 9 +- 2 files changed, 178 insertions(+), 170 deletions(-) (limited to 'tests') diff --git a/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg b/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg index ed9168fb..c733f84f 100644 --- a/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg +++ b/tests/testthat/_snaps/multistart/parplot-for-dfop-sfo-fit.svg @@ -20,177 +20,182 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - -parent_0 -f_parent_to_m1 -k2 -g -a.1 -b.1 -SD.log_k_m1 -SD.log_k1 -SD.g_qlogis - - - - - -0.5 -1.0 -1.5 -2.0 -Normalised parameters - + + + + + + + + + + + + + + + +parent_0 +k_m1 +f_parent_to_m1 +k1 +k2 +g +a.1 +b.1 +SD.parent_0 +SD.log_k_m1 +SD.f_parent_qlogis +SD.log_k1 +SD.log_k2 +SD.g_qlogis + + + + + +0.5 +1.0 +1.5 +2.0 +Normalised parameters + - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Original start -Original results -Multistart runs + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Original start +Original results +Multistart runs diff --git a/tests/testthat/test_multistart.R b/tests/testthat/test_multistart.R index dda0ea23..36aa63f7 100644 --- a/tests/testthat/test_multistart.R +++ b/tests/testthat/test_multistart.R @@ -44,13 +44,16 @@ test_that("multistart works for saem.mmkin models", { vdiffr::expect_doppelganger("mixed model fit for saem object with mkin transformations", plot_dfop_sfo_saem_m) llhist_sfo <- function() llhist(saem_sfo_s_multi) - parplot_sfo <- function() parplot(saem_sfo_s_multi, ylim = c(0.5, 2)) + parplot_sfo <- function() parplot(saem_sfo_s_multi, ylim = c(0.5, 2), las = 1) vdiffr::expect_doppelganger("llhist for sfo fit", llhist_sfo) vdiffr::expect_doppelganger("parplot for sfo fit", parplot_sfo) llhist_dfop_sfo <- function() llhist(saem_dfop_sfo_m_multi) - parplot_dfop_sfo <- function() parplot(saem_dfop_sfo_m_multi, - ylim = c(0.5, 2), llquant = 0.5) + parplot_dfop_sfo <- function() { + par(mar = c(10.1, 4.1, 2.1, 2.1)) + parplot(saem_dfop_sfo_m_multi, + ylim = c(0.5, 2), llquant = 0.5, las = 2) + } vdiffr::expect_doppelganger("llhist for dfop sfo fit", llhist_dfop_sfo) vdiffr::expect_doppelganger("parplot for dfop sfo fit", parplot_dfop_sfo) -- cgit v1.2.1