Description Usage Arguments Value Examples
This function draws the labels for the data points of
the top n
disastrous earthquakes in order of MAGNITUDE
.
1 2 3 4 |
mapping |
A set of aesthetic mappings created by aes() |
data |
A dataframe object containing the earthquake data points
from the |
stat |
A string representing the statistical transformation for this layer of the plot |
position |
A string representing the positional adjustment |
na.rm |
A logical value to indicate whether to raise warning when missing values are removed for the plot |
n_max |
An integer representing the maximum number of data labels to draw based on the magnitude of the earthquakes |
xmin |
An integer representing the minimum date value using the
|
xmax |
An integer representing the maximum date value using the
|
ctry |
A string representing the country filter for the plot |
show.legend |
A logical value to indicate whether this layer of the plot should be included in the legends |
inherit.aes |
A logical value to indicate whether to override the default aesthetics or to combine with them |
... |
A list representing other aesthetics to be passed on to this layer of the plot |
This function returns a timeline label of earthquakes for the selected country for the selected time frame
1 2 3 4 5 6 7 8 | ## Not run: ggplot(data = y, aes(x = DATE, country = COUNTRY, label = LOCATION,
magnitude = MAGNITUDE)) +
geom_timeline(ctry = "USA", xmin = dmy("01/01/2010"), xmax = dmy("01/01/2016")) +
geom_timeline_label(n_max = 5, ctry = "USA",
xmin = dmy("01/01/2010"),
xmax = dmy("01/01/2016")) +
theme_classic()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.