How can I add starting and ending numeric label on color bar ggplot map figure. For now my code looks like this:
my_breaks <- c(1,60000,1200000,24000000,320000000)
ggplot(data = opcine_spojeno) +
geom_sf(aes(fill= HAMAG_Bespovratna_IRI_Pod))+
scale_fill_viridis(trans = "log",
name="€",
breaks=c(1,60000,1200000,24000000,320000000),
labels = scales::label_comma(),
alpha = 3/4) +
labs(
subtitle = "HAMAG BICRO:Isplaćana bespovratna sredstva u razdoblju 2016-2023",
caption = "Data: HAMAG-BICRO"
) +
theme_minimal()
My map looks like this and I would like to add on color bar to the right 1 and 320 000 000, which I tried with piece of code
my_breaks <- c(1,60000,1200000,24000000,320000000)
but it only adds numbers in the middle of the color bar

Using the nc dataset as a basis. This will also work with your labels list as stated in your comment. I have included other potential options, commented out, that also work: