Closed nicholasjhorton closed 1 year ago
You do have a black and white theme (theme_bw()
), but the theme in ggplot2 doesn't handle the colors of the data. It's the scales that do that job. The theme covers things like the axes, title, other labeling, etc.
So it is a bit confusing, I guess. But this is doing what ggplot2 says it should do.
Here's an example of using a grey-scale color scale:
suppressPackageStartupMessages(library(ggformula))
gf_point(pcs ~ age, color = ~ homeless, data = mosaicData::HELPrct) |>
gf_theme(theme_bw()) |>
gf_refine(scale_color_grey())
You could also use scale_color_manual()
and select your own colors.
Created on 2023-02-18 with reprex v2.0.2
Do you have any guidance about what I'm doing wrong here? I was hoping to move to a black and white theme with this plot:
Created on 2023-02-08 with reprex v2.0.2