multiple_format | R Documentation |
Multiple Style Formatting
multiple_format(...)
... |
Arguments to be passed onto |
Since ggplot requires a function for formatting this allows the user to specify the function's arguments, which will return a function that can be used by ggplot.
The function multiple
.
Jared P. Lander
library(scales)
vect <- c(1000, 1500, 23450, 21784, 875003780)
multiple_format()(vect)
multiple_format(extra=dollar)(vect)
multiple_format(extra=identity)(vect)
require(ggplot2)
data(diamonds)
ggplot(diamonds, aes(x=x, y=y, color=price*100)) + geom_point() +
scale_color_gradient2(labels=multiple_format(extra=dollar))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.