Skip to content

Avoid type aliases #199

@vincentarelbundock

Description

@vincentarelbundock

This is just to express a personal preference for avoiding aliases in the type argument. There are already lots of possible values, and it may not be clear to users why there are differences between, for example, h, hist, and histogram, or between j and jitter. Some similar-looking things are different; others are just aliases. Sure, this can be documented, but there are costs to duplication and lack of consistency.

One potential way to distinguish the "families" of geoms, would be to let type argument accept:

  1. One-letter types as character: Standard types provided by the plot() function only. p, l, etc.
  2. Full word types as strings: New types supplied by tinyplot: hist, rect, etc.
  3. Functions: some version of type = function() #168

This would allow users to clearly distinguish functionality with just a glance at the code.

TBC, this is not a big deal at all; just an aesthetic preference. Feel free to close and keep the aliases.

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