Skip to content

text rendered incorrrectly when size and justification parameters are supplied to geom_label() #4753

Closed
@david-romano

Description

@david-romano

I posted about this in the RStudio Discourse forum, but didn't explicitly point out the effect of supplying the size parameter. Have received no responses so am posting here.

The problem appears to be an interaction between the size parameter of geom_label() and how the justification parameter values are applied to the text itself, but is not apparent unless off-center justification is supplied.

library(tidyverse)

tibble() %>% 
  ggplot() +
  geom_label(aes(0, 0, label = 'text'), 
             hjust = 0,
             size = 20,
             )

Created on 2022-03-11 by the reprex package (v2.0.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorlayers 📈

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions