You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(tidyverse)
#> Warning: package 'ggplot2' was built under R version 4.4.2
library(ggblanket)
library(palmerpenguins)
gg_blanket_colourbar_r<-function(..., col_breaks= \(x) x) {
gg_blanket(..., col_breaks=col_breaks) +
theme(legend.text= element_text(vjust= c(0, 1))) +#unsupported hack
theme(legend.key.height= rel(1.5)) +
theme(legend.key.width= rel(1)) +
theme(legend.ticks= element_line(colour="transparent"))
}
gg_blanket_colourbar_t<-function(..., col_breaks= \(x) x) {
gg_blanket(col_breaks=col_breaks, ...) +
theme(legend.text= element_text(hjust= c(0, 1))) +#unsupported hack
theme(legend.key.height= rel(0.9)) +
theme(legend.key.width= rel(1.66)) +
theme(legend.ticks= element_line(colour="transparent"))
}
set_blanket()
penguins|>
gg_blanket_colourbar_r(
geom="point",
x=flipper_length_mm,
y=body_mass_g,
col=flipper_length_mm,
mode= light_mode_r()
)
#> Warning: Vectorized input to `element_text()` is not officially supported.#> ℹ Results may be unexpected or may change in future versions of ggplot2.#> Warning: Removed 2 rows containing missing values or values outside the scale range#> (`geom_point()`).
penguins|>
gg_blanket_colourbar_t(
geom="point",
x=flipper_length_mm,
y=body_mass_g,
col=flipper_length_mm,
mode= light_mode_t()
)
#> Warning: Vectorized input to `element_text()` is not officially supported.#> ℹ Results may be unexpected or may change in future versions of ggplot2.#> Removed 2 rows containing missing values or values outside the scale range#> (`geom_point()`).
Created on 2024-12-12 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: