Skip to content

ggthemr_reset() cannot be completely cleared #55

Open
@perlatex

Description

@perlatex

The old problem did not appear, but the new problem appeared.

library(tibble)
library(dplyr)
library(ggplot2)


tb <- tibble(
  x = letters[1:9],
  y = 1:9
)

tb %>%
  ggplot(aes(x, y, color = x)) +
  geom_point()

AA

but,after load ggthemr

library(ggthemr)
ggthemr("dust")
ggthemr_reset()


# does not work
tb %>%
  ggplot(aes(x, y, color = x)) +
  geom_point()
# Error: Your data requires 9 colours but the swatch provided by ggthemr only has 8. To resolve this you can provide an appropriate 
# vector of colours to your scale or expand the swatch using set_swatch(). Note: if you are using a custom palette, the first swatch colour 
# is separate from the others. See the documentation for define_palette() and/or set_swatch()

still does not work

pacman::p_unload("ggthemr")

tb %>%
  ggplot(aes(x, y, color = x)) +
  geom_point()
# Error: Your data requires 9 colours but the swatch provided by ggthemr only has 8. To resolve this you can provide an appropriate 
# vector of colours to your scale or expand the swatch using set_swatch(). Note: if you are using a custom palette, the first swatch colour 
# is separate from the others. See the documentation for define_palette() and/or set_swatch()

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