Description Usage Arguments Value Examples
View source: R/geom_timeline_label.R
Function plots Labels for earthquakes.
1 2 3 |
mapping |
mapping |
data |
data |
stat |
stat |
position |
position |
na.rm |
na.rm |
show.legend |
show.legend |
inherit.aes |
inherit.aes |
... |
... |
ggplot layer with labels
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
d%>%subset(COUNTRY=="USA" | COUNTRY=="CHINA")%>%subset(DATE>=as.Date("2000-01-01"))%>%
ggplot(aes(DATE, COUNTRY, colour = DEATHS, size = EQ_PRIMARY, label = LOCATION_NAME)) +
geom_timeline()+ geom_timeline_label(n_max=5)+
guides(size = guide_legend("Richter scale value")) +
guides(colour = guide_colorbar("# Deaths", label.theme = element_text(angle = 45, size = 8 ))) +
ylab("") +
theme_classic() +
theme(legend.position="bottom", axis.line.y = element_blank())
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.