Skip to content

Conversation

@SchmidtPaul
Copy link
Contributor

@SchmidtPaul SchmidtPaul commented Nov 13, 2025

Summary

This PR fixes the strip.cex parameter in ggdesplot() to properly control the facet strip text size. Previously, the strip text size was hardcoded to 5, ignoring the user-provided strip.cex parameter.

Changes

  • Changed strip.text = element_text(size=5) to strip.text = element_text(size = 11 * strip.cex) in R/ggdesplot.R (line 540)
  • The strip text size now properly respects the strip.cex parameter by multiplying it by the base font size (11 points), consistent with ggplot2 conventions

Testing

Tested with agridat::besag.met dataset:

  • strip.cex = 0.5 produces smaller strip text
  • strip.cex = 1.5 produces larger strip text
  • Default strip.cex = 0.75 works as expected

Benefits

  • Users can now control facet strip text size as documented
  • Brings ggplot2 version closer to feature parity with lattice version
  • Small, focused change with no side effects

Previously, the strip text size was hardcoded to 5, ignoring the
user-provided strip.cex parameter. Now the strip text size properly
respects the strip.cex parameter by multiplying it by the base font
size (11 points), consistent with ggplot2 conventions.

This improvement ensures users can control the facet strip text size
as documented.
@kwstat kwstat merged commit c36468a into kwstat:main Nov 13, 2025
1 check passed
@kwstat
Copy link
Owner

kwstat commented Nov 13, 2025

Thanks

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.

3 participants