geofacet icon indicating copy to clipboard operation
geofacet copied to clipboard

Labeller function label_wrap_gen() not working

Open gkaramanis opened this issue 2 years ago • 0 comments

Thanks for making one of my favourite packages!

When I try to use label_wrap_gen() with geofacet the labels don't seem to wrap. Do I miss something?

Here is a reprex:

library(ggplot2)
library(geofacet)
library(stringr)

ggplot(state_ranks, aes(variable, rank, fill = variable)) +
    geom_col() +
    coord_flip() +
    facet_wrap(vars(name), labeller = labeller(name = label_wrap_gen(20))) +
    guides(fill = "none")

ggplot(state_ranks, aes(variable, rank, fill = variable)) +
    geom_col() +
    coord_flip() +
    facet_geo(vars(name), labeller = labeller(name = label_wrap_gen(20))) +
    guides(fill = "none")
#> Warning: Using `as.character()` on a quosure is deprecated as of rlang 0.3.0.
#> Please use `as_label()` or `as_name()` instead.
#> This warning is displayed once per session.

Created on 2022-02-24 by the reprex package (v2.0.1)

gkaramanis avatar Feb 24 '22 16:02 gkaramanis