Skip to content

Tick label formatting doesn't work with ggplot scale_y_continuous #391

Closed
@jseppanen

Description

@jseppanen

When making a plot that uses either of:

  • scale_y_continuous(label=percent) – format Y axis ticks as dollar values
  • scale_y_continuous(label=dollar) – format Y axis ticks as percentages (scaling 1.00 into 100%),

the axis label formatting doesn't take any effect in the plotly plot, although it works as intended in ggplot2 plots (on screen or when saved to png files).

Example R code:

library(ggplot2)
library(scales)
library(plotly)

# put some data into d

  p <- ggplot(d, aes(date, revenue)) +
    geom_line() +
    scale_y_continuous(label=dollar)
  t <- plotly_POST(p)

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