I am working with the R programming language.
I am trying to disable scientific notation from all plots produced using the ggplot library.
Normally, I use the following command to disable scientific notation :
options(scipen=999)
However, this above code does not seem to disable the scientific notation for plots such as the one below (e.g. in the legend):
g1 = ggplot() +
geom_sf(data = st_trans,
aes(fill = cut_number(min_distance, 9)),
alpha = 0.8,
colour = 'white',
size = 0.3) +
scale_fill_brewer(palette = "PuBu",
name = "Minimum Distance") +
labs(x = NULL, y = NULL,
title = "Minimum Distance",
subtitle = "Source: Your Data",
caption = "Your Caption") +
theme(panel.background = element_blank(),
line = element_blank()) +
coord_sf(datum = NA) +
scale_x_continuous(labels = scales::comma) +
scale_y_continuous(labels = scales::comma)
Does anyone know if there is some "master command" that can disable the scientific notation in all plots produced using ggplot?
Thanks!