Skip to content

Using base_size to set geomn_defaults #69

Description

@Olivia-Box-Power

use_afcharts will use the theme base_size to set geom defaults (e.g. the default linewidth for geom_hline). However, as these properties are not part of the theme they can not be overwritten by theme_af.

library(ggplot2)
library(afcharts)

# base_size argument of
use_afcharts(base_size = 40)

ggplot() +
  geom_hline(aes(yintercept  = 4.187))

use_afcharts(base_size = 10)

ggplot() +
  geom_hline(aes(yintercept  = 4.187))

# base_size argument of theme_af doesn't impact linewith
ggplot() +
  geom_hline(aes(yintercept  = 4.187)) +
  theme_af(base_size = 40)

We could

  1. Leave this as is
  2. Use a different argument name for setting geom defaults
  3. Update the geom defaults to fix them to a particular size, unrelated to the base_size

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions