Skip to content

Deprecated ggplot2 arguments #408

@BjarkeHautop

Description

@BjarkeHautop

Currently, there are 3 deprecated ggplot2 arguments that appears when running devtools::test():

  • The draw_quantiles argument of geom_violin() is deprecated as of ggplot2 4.0.0.
    i Please use the quantiles.linetype argument instead. (Note this deprecation is supposed to say quantile.linetype, as seen in the documentation https://ggplot2.tidyverse.org/reference/geom_violin.html)

This is only used internally, since the public API for ppc_violin_grouped() uses probs. However, when changing all instances of draw_quantiles to quantile.linetype, a test in test-ppc-distributions.R at line 334/335 fails:

> ppc_violin_grouped(vdiff_y, vdiff_yrep, vdiff_group)
Error:
! Problem while converting geom to grob.
ℹ Error occurred in the 1st layer.
Caused by error in `draw_panel()`:
! `geom_path()` can't have varying colour, linewidth, and/or alpha along the line when linetype isn't solid.
Run `rlang::last_trace()` to see where the error occurred.
  • ppc_intervals() / ppd_intervals() use deprecated ggplot2 arguments (fatten, size).

The fatten argument of geom_pointrange() is deprecated as of ggplot2 4.0.0.
i Please use the size aesthetic instead.

Using size aesthetic for lines was deprecated in ggplot2 3.4.0.
i Please use linewidth instead.

Changing the public API would be breaking. Furthermore, replacing fatten with size would mean the new size would semantically correspond to the old fatten, not the existing size.

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