Skip to content

Deprecated size usage in exported helpers and documentation examples #445

@ishaan-arora-1

Description

@ishaan-arora-1

A few places still use size where ggplot2 3.4+ expects linewidth:

Exported API:

  • grid_lines(color, size) in R/bayesplot-helpers.R accepts a size parameter and its @param documents it as size, but internally passes it as linewidth to element_line(). The parameter should be renamed to linewidth (with size kept as a deprecated alias for back-compat).
  • The internal grid_lines_y() has the same issue.

Documentation examples:

  • R/mcmc-diagnostics.R line 80: hline_at(0.5, linetype = 2, size = 0.15, color = "gray") — should use linewidth since hline_at() forwards ... to geom_hline().
  • R/mcmc-scatterplots.R line 112: geom_smooth(method = "lm", se = FALSE, color = "gray20", size = .75, linetype = 2) — should use linewidth.

These produce deprecation warnings on ggplot2 >= 3.4.0.

AI Usage Policy :
This issue was found using an LLM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions