Skip to content

Allow x_axis_date_format argument to ptd_create_ggplot() to accept a function not just a string #197

@francisbarton

Description

@francisbarton

Currently ptd_create_ggplot passes x_axis_date_format to the date_labels argument of ggplot2::scale_x_datetime(), which only accepts a format string.

The labels argument of ggplot2::scale_x_datetime() will accept a function or a string (or a vector).

I wonder if we could build in some logic to PTD that would handle a function if supplied to x_axis_date_format, and pass this to labels instead of date_labels.

I haven't done any work on trying to make this work, just asking the question for now.

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