View source: R/tm_components.R
tm_logo | R Documentation |
Map component that adds a logo.
tm_logo(
file,
height,
margins,
between_margin,
stack,
position,
group_id,
frame,
frame.color,
frame.alpha,
frame.lwd,
frame.r,
z
)
file |
either a filename or url of a png image. If multiple files/urls are provided with a character vector, the logos are placed near each other.
To specify logos for small multiples use a list of character values/vectors. In order to stack logos vertically, multiple |
height |
height of the logo in number of text line heights. The width is scaled based the height and the aspect ratio of the logo. If multiple logos are specified by a vector or list, the heights can be specified accordingly. |
margins |
margins |
between_margin |
Margin between |
stack |
stack with other map components, either |
position |
The position specification of the component: an object created with |
group_id |
Component group id name. All components (e.g. legends, titles, etc) with the same |
frame |
frame should a frame be drawn? |
frame.color |
frame color |
frame.alpha |
frame alpha transparancy |
frame.lwd |
frame line width |
frame.r |
Radius of the rounded frame corners. 0 means no rounding. |
z |
z index, e.g. the place of the component relative to the other componets |
data(World)
tm_shape(World) +
tm_polygons("HPI", fill.scale = tm_scale_intervals(values = "brewer.rd_yl_gn")) +
tm_logo(c("https://www.r-project.org/logo/Rlogo.png",
system.file("help", "figures", "logo.png", package = "tmap"))) +
tm_logo("http://blog.kulikulifoods.com/wp-content/uploads/2014/10/logo.png",
height=5, position = c("left", "top"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.