R: ggplot heatmap color change
问题 df.team_data <- expand.grid(teams = c("Team A", "Team B", "Team C", "Team D") ,metrics = c("Metric 1", "Metric 2", "Metric 3", "Metric 4", "Metric 5") ) set.seed(41) df.team_data$performance <- sample(c(0, 1), 20, replace = TRUE) head(df.team_data) ggplot(data = df.team_data, aes(x = metrics, y = teams)) + geom_tile(aes(fill = performance)) I have a very simple heatmap with just two colors. How do I designate which colors are associated with the value of performance ? For this, I would like