Skip to content

decodeplot: decode the titles of all legends - #231

Merged
boutinb merged 1 commit into
jasp-stats:masterfrom
boutinb:decodeAllLegendTitles
Nov 5, 2026
Merged

boutinb merged 1 commit into
jasp-stats:masterfrom
boutinb:decodeAllLegendTitles

Conversation

@boutinb

@boutinb boutinb commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

decodeplot.gg replaced the guides only for x, y, colour, fill and shape, so the titles of linetype, linewidth, size and alpha legends stayed encoded (e.g. JASPColumn_D1_F1_77_Encoded).

Besides showing the encoded name, this splits legends: ggplot2 merges the legends of one variable only when their titles are equal, so a plot mapping one variable to shape and linetype (as afex::afex_plot does in jaspMixedModels) got two legends, one decoded and one encoded. This is what fails plot-lmm-2 in the jaspMixedModels unit tests.

The fix decodes every aesthetic that can get a legend (colour, fill, shape, linetype, linewidth, size, alpha). A new test checks that shape + linetype + fill, and size + alpha + linewidth, of one encoded variable give a single decoded legend; it fails without the fix. The whole jaspBase test suite passes.

🤖 Generated with Claude Code

ggplot2 merges legends only when their titles are equal. afex_plot (jaspMixedModels)
maps one variable to shape, linetype and fill: the linetype legend kept its encoded
title, so the legend split in two and showed JASPColumn_..._Encoded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boutinb
boutinb merged commit 5ac9db8 into jasp-stats:master Nov 5, 2026
8 of 9 checks passed
boutinb added a commit to boutinb/jaspMixedModels that referenced this pull request Nov 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
boutinb added a commit to jasp-stats/jaspMixedModels that referenced this pull request Nov 6, 2026
* Fix unit tests for the QML-form option parsing in jaspTools

- Larks and Owls: jaspTools:::encodeOptionsAndDataset is gone, run the analysis on
  the dataset directly; results and plot now show the real column names
- boxjitter is not a value of plotBackgroundElement (disabled in the QML): the
  form rejected it and aborted the rest of the LMM file. Use boxplot and enable
  the two plot tests that were skipped because of boxjitter
- randomComponents rows the tests left out now get the form's default
  (randomSlopes checked), adding slopes the references never had: list them
  with randomSlopes = FALSE
- plot.svg: new jitter positions since jaspBase dropped the legacy RNG
- renv.lock: jaspBase with the legacy RNG removed and every legend title
  decoded (plot-lmm-2 split its legend on an encoded linetype title),
  later 1.4.8 (1.4.5 does not compile on Ubuntu 26.04)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update the Windows-only GLMM references; drop archived plogr from renv.lock

- GLMM: Variable1 (values 1/2) is now read as a nominal factor, as Desktop
  imports it, so its fixed and random effects are sum-coded ("Variable1 (1)").
  Fit statistics are unchanged; values taken from the Windows lockfile job.
  plot-glmm-1: only the jittered points moved (jaspBase RNG change).
- renv.lock: plogr was archived on CRAN, which made the Ubuntu lockfile
  setup fail ("Can't find package called plogr"). It was only needed by
  RSQLite 2.4.5; RSQLite 3.53.3 no longer links to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Bump RcppParallel to 6.2.1; skip the singular LMM block on macOS

- renv.lock: the Ubuntu 26.04 binary of rstan 2.32.7 from Posit Package
  Manager is built against RcppParallel 6 (oneTBB), so with the locked
  RcppParallel 5.1.11-1 rstan fails to load
  (undefined symbol tbb::detail::r1::observe).
- test-mixedmodelslmm.R: the "no correlations between random effects"
  model (5 groups, 4 uncorrelated random slopes) is singular, and on macOS
  the optimizer ends at a different point than on Linux/Windows, where the
  references come from. Skip its tests on macOS only, inside each
  test_that, so the later blocks still run there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* renv.lock: jaspBase at the merge commit of jasp-stats/jaspBase#231

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant