# label_number_hdx()
library(ggplot2)
# discrete scaling
p <- ggplot(txhousing) +
geom_point(
aes(
x = median,
y = volume
)
)
p
p +
scale_x_continuous(
labels = label_number_hdx("$")
) +
scale_y_continuous(
labels = label_number_hdx()
)
# number_hdx()
x <- c(1234, 7654321)
format_number_hdx(x)
format_number_hdx(x, "$")
Run the code above in your browser using DataLab