Description Usage Arguments Aesthetics Examples
A geom that displays cars. This geom was implemented on a lark as an answer to a question on SO.
1 2 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
... |
additional arguments passed on to |
inherit.aes |
If |
show.legend |
logical. Should this layer be included in the legends?
|
geom_car
understands the following aesthetics (required aesthetics are in bold):
x
y
length
width
alpha
colour
fill
group
linetype
size
Learn more about setting these aesthetics in vignette("ggplot2-specs")
1 2 3 4 5 6 7 8 9 10 11 | library(ggplot2)
ggplot(
geom.car.data, # ggbg data set
aes(x=x, y=y, length=length, width=width, fill=label)
) +
geom_hline(yintercept=seq(5, 35, by=10), color="white", size=2, linetype=2) +
geom_car() +
coord_equal() +
theme(panel.background = element_rect(fill="#555555"),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.