Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

axis_labels

Axis labels


Description

Add axis labels

Usage

tm_xlab(text, size = 0.8, rotation = 0, space = 0)

tm_ylab(text, size = 0.8, rotation = 90, space = 0)

Arguments

text

text for the axis

size

fontsize, by default 0.8

rotation

rotation angle in degrees. By default, 0 for the x axis label and 90 for the y axis label.

space

space between labels and the map in numbers of line heights. By default, it is 0, unless grid labels are plotted outside the frame (i.e., tm_grid is called with labels.inside.frame = FALSE). In that case, space corresponds to the height of one line, taking the grid label size into account.

Examples

data(World)

qtm(World, fill="#FFF8DC", projection=4326, inner.margins=0) +
	tm_grid(x = seq(-180, 180, by=20), y=seq(-90,90,by=10), col = "gray70") +
	tm_xlab("Longitude") +
	tm_ylab("Latitude")

tmap

Thematic Maps

v3.3-1
GPL-3
Authors
Martijn Tennekes [aut, cre], Jakub Nowosad [ctb], Joel Gombin [ctb], Sebastian Jeworutzki [ctb], Kent Russell [ctb], Richard Zijdeman [ctb], John Clouse [ctb], Robin Lovelace [ctb], Jannes Muenchow [ctb]
Initial release
2021-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.