Closed davidhodge931 closed 6 months ago
Only will work for x
, y
and col
library(tidyverse)
library(ggblanket)
set_blanket()
df <- mtcars |>
mutate(cyl = factor(cyl))
attr(df$mpg, "label") <- "Miles per gallon"
attr(df$disp, "label") <- "Displacement"
attr(df$drat, "label") <- "Rear axle ratio"
attr(df$cyl, "label") <- "Cylinder"
attr(df$wt, "label") <- "Weight"
attr(df$hp, "label") <- "Horsepower"
df |>
gg_point(
x = wt,
y = hp,
col = cyl,
)
df |>
gg_histogram(
x = wt,
col = cyl,
)
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Created on 2024-05-04 with reprex v2.1.0