plot.nCov2019 | R Documentation |
plot map with ggplots, it is the core of plot.nCov2019 and Plot.nCov2019History.
## S3 method for class 'nCov2019' plot( x, region = "Global", continuous_scale = FALSE, palette = "Reds", date = NULL, title = "COVID19", type = "cases", ... ) ## S3 method for class 'nCov2019History' plot( x, region = "Global", continuous_scale = TRUE, palette = "Reds", date = NULL, from = NULL, to = NULL, width = 600, height = 600, filename = "nCov2019.gif", fps = 2, type = "cases", ... )
x |
data for plot, it should be class of nCov2019 or nCov2019Hisory. |
region |
If Global or a specified region. |
continuous_scale |
logical, Whether to use continuous fill color, if TRUE(the default), use continuous type, otherwise use discrete type. |
palette |
If a string, will use that named palette. If a number, will index into the list of palettes of appropriate type. The list of available palettes can found in the Palettes section. |
date |
Specify the date. |
title |
Title of the map. |
type |
Specify the type of Statistics. |
... |
Additional parameters. |
from |
start date to plot |
to |
end date to plot. Both from and to should be specify, otherwise they will be ignored. If both from and to are specify, an animation will be created. |
width |
width of the plot, only works for animation |
height |
height of the plot, only works for animation |
filename |
name of output file. |
fps |
fps of the animation, only works for animation |
A 'ggplot' object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.