teunbrand / ggh4x

ggplot extension: options for tailored facets, multiple colourscales and miscellaneous
https://teunbrand.github.io/ggh4x/
Other
534 stars 32 forks source link

Error in legend$train when using "stringlegend" #127

Closed heeringa0 closed 9 months ago

heeringa0 commented 9 months ago

Running:

p <- ggplot(mpg, aes(displ, hwy)) + geom_point(aes(colour = manufacturer)) p + guides(colour = guide_stringlegend(ncol = 2)) p + scale_colour_viridis_d(guide = "stringlegend")

gives an error:

Warning: Error in legend$train: attempt to apply non-function

teunbrand commented 9 months ago

Thanks for the report. Can I inquire which version of ggplot2 and ggh4x you are using?

heeringa0 commented 9 months ago

Sure.

I reinstalled the two packages, and the problem got solved:

R version 4.3.1 ggplot2 version 3.4.3 ggh4x version 0.2.6

Thanks!


From: Teun van den Brand @.> Sent: Friday, September 15, 2023 11:17 PM To: teunbrand/ggh4x @.> Cc: Wilbert Heeringa @.>; Author @.> Subject: Re: [teunbrand/ggh4x] Error in legend$train when using "stringlegend" (Issue #127)

Thanks for the report. Can I inquire which version of ggplot2 and ggh4x you are using?

— Reply to this email directly, view it on GitHubhttps://github.com/teunbrand/ggh4x/issues/127#issuecomment-1721872994, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFKKNGKRSQ2JAE7GJZ2EL7LX2TAWRANCNFSM6AAAAAA42INWEQ. You are receiving this because you authored the thread.Message ID: @.***>

teunbrand commented 9 months ago

Glad to know that resolved the problem!