Skip to content

Default bg color in type_ridge fails #547

@zeileis

Description

@zeileis

If the theme sets a palette.qualitative then type_ridge fails to set the default background:

tinyplot(species ~ body_mass, data = penguins, type = "ridge", theme = "clean2")
## Error in by_col() : argument "by_ordered" is missing, with no default

The culprit is a call to by_col() in this line: https://github.com/grantmcdermott/tinyplot/blob/main/R/type_ridge.R#L438

This doesn't work anymore after restructing the by aesthetics. I'm not sure what currently is the best way to determine the default fill color. (BTW: Also, the default fill color currently differs between different tinyplot types, e.g., boxplot, barplot, histogram.

A possible workaround for users is currently to set the bg color explicitly, e.g.

tinyplot(species ~ body_mass, data = penguins, type = "ridge", theme = "clean2", bg = "lightblue1")
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions