Skip to content

Should type_histogram (and co.) be exported? #231

@grantmcdermott

Description

@grantmcdermott

In the NEWS, we say:

Breaking changes:

  • Type-specific arguments are no longer passed through the main function via
    .... Instead, they are now passed through a dedicated type_*() functions in
    the type argument.

So I was a bit surprised that this didn't work:

plt(
    ~Petal.Width | Species, iris,
    type = type_histogram(breaks = 30)
) 
#> Error in type_histogram(breaks = 30) : 
#>   could not find function "type_histogram"

Looking at the code, I can see two issues:

  1. We don't actually export type_histogram().
  2. We don't pass arguments from this top-level function down to the companion data_histogram() function.

I assume that we want to do both of these things, and similarly for other non-exported types like type_density(). @vincentarelbundock does that sound right right to you? I just want to make sure that any changes I make are consistent with the new types design.

P.S. Related to #225 since background alpha is another argument that could be inherited from type_histogram().

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