Am getting the error when adding a label to my scale_colour_stepsn*
Error in `check_breaks_labels()`:
! `breaks` and `labels` must have the same length
*am using this to specific the colours of my bins rather than putting my data on a scale/gradient
Have looked around for a solution but they all seem to be for characters, whereas my data is numerical (continuous) and I'm not sure how to apply those solutions to my situation
Here's my code:
my_colours<- c("#00B050", "#92D050", "#FFFFB2", "#FED976", "#FEB24C")
aus_shp<- read_sf("~/map files/STE_2016_AUST.shp")
aus_shp$ent_gentob<- c(4.3,11.9,8.3,6.1,14.5,0.0,16.8,4.6,NA)
ggplot(data = aus_shp) +
geom_sf(aes(fill = ent_gentob))+
theme_void()+
theme(legend.position = c(.93, .93),
legend.justification = c("right", "top"),
legend.box.just = "right",
legend.margin = margin(6, 6, 6, 6))+
scale_colour_stepsn(
colours = my_colours,
breaks = c(1,5,10,15,20),
labels = c(">1%", "1-<5%", "5-<10%", "10-<15%", "15-<20%"),
aesthetics = "fill",
name = "% R"
)
I need to replicate this chart several times for different numerical variables using the same scale
Thanks in advance

