Skip to content

Commit

Permalink
Merge pull request #862 from olivroy/pdf-manual
Browse files Browse the repository at this point in the history
Have shorter lines for pdf manual.
  • Loading branch information
olivroy committed Apr 10, 2024
2 parents ce60893 + 2ce75c2 commit f012855
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 16 deletions.
74 changes: 70 additions & 4 deletions R/tm_layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,81 @@
#' Layout options
#'
#' Set of tmap options that are directly related to the layout.
#'
#' @param modes,crs,facet.max,facet.flip,raster.max.cells,show.messages,show.warnings,output.format,output.size,output.dpi,output.dpi.animation,value.const,value.na,value.null,value.blank,values.var,values.range,value.neutral,scales.var,scale.misc.args,label.format,label.na,scale,asp,bg.color,outer.bg.color,frame,frame.lwd,frame.r,frame.double.line,outer.margins,inner.margins,inner.margins.extra,meta.margins,meta.auto.margins,between.margin,component.offset,component.stack.margin,grid.mark.height,xylab.height,coords.height,xlab.show,xlab.text,xlab.size,xlab.color,xlab.rotation,xlab.space,xlab.fontface,xlab.fontfamily,xlab.side,ylab.show,ylab.text,ylab.size,ylab.color,ylab.rotation,ylab.space,ylab.fontface,ylab.fontfamily,ylab.side,panel.type,panel.wrap.pos,panel.xtab.pos,unit,color.sepia.intensity,color.saturation,color.vision.deficiency.sim,text.fontface,text.fontfamily,legend.show,legend.design,legend.orientation,legend.position,legend.width,legend.height,legend.stack,legend.group.frame,legend.resize.as.group,legend.reverse,legend.na.show,legend.title.color,legend.title.size,legend.title.fontface,legend.title.fontfamily,legend.xlab.color,legend.xlab.size,legend.xlab.fontface,legend.xlab.fontfamily,legend.ylab.color,legend.ylab.size,legend.ylab.fontface,legend.ylab.fontfamily,legend.text.color,legend.text.size,legend.text.fontface,legend.text.fontfamily,legend.frame,legend.frame.lwd,legend.frame.r,legend.bg.color,legend.bg.alpha,legend.settings.standard.portrait,legend.settings.standard.landscape,title.show,title.size,title.color,title.fontface,title.fontfamily,title.bg.color,title.bg.alpha,title.padding,title.frame,title.frame.lwd,title.frame.r,title.stack,title.position,title.group.frame,title.resize.as.group,credits.show,credits.size,credits.color,credits.fontface,credits.fontfamily,credits.bg.color,credits.bg.alpha,credits.padding,credits.frame,credits.frame.lwd,credits.frame.r,credits.stack,credits.position,credits.width,credits.heigth,credits.group.frame,credits.resize.as.group,compass.north,compass.type,compass.text.size,compass.size,compass.show.labels,compass.cardinal.directions,compass.text.color,compass.color.dark,compass.color.light,compass.lwd,compass.bg.color,compass.bg.alpha,compass.margins,compass.show,compass.stack,compass.position,compass.frame,compass.frame.lwd,compass.frame.r,compass.group.frame,compass.resize.as.group,scalebar.show,scalebar.breaks,scalebar.width,scalebar.text.size,scalebar.text.color,scalebar.color.dark,scalebar.color.light,scalebar.lwd,scalebar.position,scalebar.bg.color,scalebar.bg.alpha,scalebar.size,scalebar.margins,scalebar.stack,scalebar.frame,scalebar.frame.lwd,scalebar.frame.r,scalebar.group.frame,scalebar.resize.as.group,grid.show,grid.labels.pos,grid.x,grid.y,grid.n.x,grid.n.y,grid.crs,grid.col,grid.lwd,grid.alpha,grid.labels.show,grid.labels.size,grid.labels.col,grid.labels.rot,grid.labels.format,grid.labels.cardinal,grid.labels.margin.x,grid.labels.margin.y,grid.labels.space.x,grid.labels.space.y,grid.labels.inside.frame,grid.ticks,grid.lines,grid.ndiscr,mouse_coordinates.stack,mouse_coordinates.position,mouse_coordinates.show,panel.show,panel.labels,panel.label.size,panel.label.color,panel.label.fontface,panel.label.fontfamily,panel.label.bg.color,panel.label.height,panel.label.rot,qtm.scalebar,qtm.minimap,qtm.mouse.coordinates,earth.boundary,earth.boundary.color,earth.boundary.lwd,earth.datum,space.color,attr.color,max.categories,legend.hist.bg.color,legend.hist.bg.alpha,legend.hist.size,legend.hist.height,legend.hist.width,attr.outside,attr.outside.position,attr.outside.size,attr.position,attr.just,basemap.server,basemap.alpha,basemap.zoom,overlays,overlays.alpha,alpha,colorNA,symbol.size.fixed,dot.size.fixed,text.size.variable,bbox,check.and.fix,set.bounds,set.view,set.zoom.limits,name,basemap.show See [tmap_options()]
#'
#' @param modes,crs,facet.max,facet.flip,raster.max.cells,show.messages,show.warnings,output.format,output.size,output.dpi,output.dpi.animation,value.const,value.na,value.null,value.blank,values.var,values.range,value.neutral,scales.var,scale.misc.args See [tmap_options()]
#' @param label.format,label.na,scale,asp,bg.color,outer.bg.color,frame,frame.lwd,frame.r,frame.double.line,outer.margins,inner.margins,inner.margins.extra,meta.margins,meta.auto.margins,between.margin,component.offset,component.stack.margin See [tmap_options()]
#' @param grid.mark.height,xylab.height,coords.height,xlab.show,xlab.text,xlab.size,xlab.color,xlab.rotation,xlab.space,xlab.fontface,xlab.fontfamily,xlab.side,ylab.show,ylab.text,ylab.size,ylab.color,ylab.rotation,ylab.space,ylab.fontface,ylab.fontfamily,ylab.side See [tmap_options()]
#' @param panel.type,panel.wrap.pos,panel.xtab.pos,unit,color.sepia.intensity,color.saturation,color.vision.deficiency.sim,text.fontface,text.fontfamily See [tmap_options()]
#' @param legend.show,legend.design,legend.orientation,legend.position,legend.width,legend.height,legend.stack,legend.group.frame,legend.resize.as.group,legend.reverse,legend.na.show,legend.title.color,legend.title.size,legend.title.fontface,legend.title.fontfamily,legend.xlab.color,legend.xlab.size,legend.xlab.fontface,legend.xlab.fontfamily,legend.ylab.color,legend.ylab.size,legend.ylab.fontface,legend.ylab.fontfamily,legend.text.color,legend.text.size,legend.text.fontface,legend.text.fontfamily,legend.frame,legend.frame.lwd,legend.frame.r,legend.bg.color,legend.bg.alpha,legend.settings.standard.portrait,legend.settings.standard.landscape See [tmap_options()]
#' @param title.show,title.size,title.color,title.fontface,title.fontfamily,title.bg.color,title.bg.alpha,title.padding,title.frame,title.frame.lwd,title.frame.r,title.stack,title.position,title.group.frame,title.resize.as.group See [tmap_options()]
#' @param credits.show,credits.size,credits.color,credits.fontface,credits.fontfamily,credits.bg.color,credits.bg.alpha,credits.padding,credits.frame,credits.frame.lwd,credits.frame.r,credits.stack,credits.position,credits.width,credits.heigth,credits.group.frame,credits.resize.as.group See [tmap_options()]
#' @param compass.north,compass.type,compass.text.size,compass.size,compass.show.labels,compass.cardinal.directions,compass.text.color,compass.color.dark,compass.color.light,compass.lwd,compass.bg.color,compass.bg.alpha,compass.margins,compass.show,compass.stack,compass.position,compass.frame,compass.frame.lwd,compass.frame.r,compass.group.frame,compass.resize.as.group See [tmap_options()]
#' @param scalebar.show,scalebar.breaks,scalebar.width,scalebar.text.size,scalebar.text.color,scalebar.color.dark,scalebar.color.light,scalebar.lwd,scalebar.position,scalebar.bg.color,scalebar.bg.alpha,scalebar.size,scalebar.margins,scalebar.stack,scalebar.frame,scalebar.frame.lwd,scalebar.frame.r,scalebar.group.frame,scalebar.resize.as.group See [tmap_options()]
#' @param grid.show,grid.labels.pos,grid.x,grid.y,grid.n.x,grid.n.y,grid.crs,grid.col,grid.lwd,grid.alpha,grid.labels.show,grid.labels.size,grid.labels.col,grid.labels.rot,grid.labels.format,grid.labels.cardinal,grid.labels.margin.x,grid.labels.margin.y,grid.labels.space.x,grid.labels.space.y,grid.labels.inside.frame,grid.ticks,grid.lines,grid.ndiscr See [tmap_options()]
#' @param mouse_coordinates.stack,mouse_coordinates.position,mouse_coordinates.show,panel.show,panel.labels,panel.label.size,panel.label.color,panel.label.fontface,panel.label.fontfamily,panel.label.bg.color,panel.label.height,panel.label.rot,qtm.scalebar,qtm.minimap,qtm.mouse.coordinates See [tmap_options()]
#' @param earth.boundary,earth.boundary.color,earth.boundary.lwd,earth.datum,space.color,attr.color,max.categories,legend.hist.bg.color,legend.hist.bg.alpha,legend.hist.size,legend.hist.height,legend.hist.width,attr.outside,attr.outside.position,attr.outside.size,attr.position,attr.just,basemap.server,basemap.alpha,basemap.zoom,overlays,overlays.alpha,alpha,colorNA,symbol.size.fixed,dot.size.fixed,text.size.variable,bbox,check.and.fix,set.bounds,set.view,set.zoom.limits,name,basemap.show See [tmap_options()]
#' @param title,main.title deprecated
#' @param ... used to catch other deprecated arguments
#' @rdname tm_layout
#' @example ./examples/tm_layout.R
#' @name tm_layout
#' @export
tm_layout = function(
modes, crs, facet.max, facet.flip, raster.max.cells, show.messages, show.warnings, output.format, output.size, output.dpi, output.dpi.animation, value.const, value.na, value.null, value.blank, values.var, values.range, value.neutral, scales.var, scale.misc.args, label.format, label.na, scale, asp, bg.color, outer.bg.color, frame, frame.lwd, frame.r, frame.double.line, outer.margins, inner.margins, inner.margins.extra, meta.margins, meta.auto.margins, between.margin, component.offset, component.stack.margin, grid.mark.height, xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color, xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side, ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space, ylab.fontface, ylab.fontfamily, ylab.side, panel.type, panel.wrap.pos, panel.xtab.pos, unit, color.sepia.intensity, color.saturation, color.vision.deficiency.sim, text.fontface, text.fontfamily, legend.show, legend.design, legend.orientation, legend.position, legend.width, legend.height, legend.stack, legend.group.frame, legend.resize.as.group, legend.reverse, legend.na.show, legend.title.color, legend.title.size, legend.title.fontface, legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface, legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface, legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface, legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r, legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait, legend.settings.standard.landscape, title.show, title.size, title.color, title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding, title.frame, title.frame.lwd, title.frame.r, title.stack, title.position, title.group.frame, title.resize.as.group, credits.show, credits.size, credits.color, credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha, credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack, credits.position, credits.width, credits.heigth, credits.group.frame, credits.resize.as.group, compass.north, compass.type, compass.text.size, compass.size, compass.show.labels, compass.cardinal.directions, compass.text.color, compass.color.dark, compass.color.light, compass.lwd, compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack, compass.position, compass.frame, compass.frame.lwd, compass.frame.r, compass.group.frame, compass.resize.as.group, scalebar.show, scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color, scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position, scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins, scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r, scalebar.group.frame, scalebar.resize.as.group, grid.show, grid.labels.pos, grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha, grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot, grid.labels.format, grid.labels.cardinal, grid.labels.margin.x, grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y, grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr, mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show, panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily, panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar, qtm.minimap, qtm.mouse.coordinates, earth.boundary, earth.boundary.color, earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories, legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height, legend.hist.width, attr.outside, attr.outside.position, attr.outside.size, attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom, overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed, text.size.variable, bbox, check.and.fix, set.bounds, set.view, set.zoom.limits, name, basemap.show,
modes, crs, facet.max, facet.flip,
raster.max.cells, show.messages, show.warnings,
output.format, output.size, output.dpi, output.dpi.animation,
value.const, value.na, value.null, value.blank, values.var,
values.range, value.neutral, scales.var, scale.misc.args,
label.format, label.na, scale, asp, bg.color, outer.bg.color,
frame, frame.lwd, frame.r, frame.double.line, outer.margins,
inner.margins, inner.margins.extra, meta.margins, meta.auto.margins,
between.margin, component.offset, component.stack.margin, grid.mark.height,
xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color,
xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side,
ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space,
ylab.fontface, ylab.fontfamily, ylab.side, panel.type, panel.wrap.pos,
panel.xtab.pos, unit, color.sepia.intensity, color.saturation,
color.vision.deficiency.sim, text.fontface, text.fontfamily, legend.show,
legend.design, legend.orientation, legend.position, legend.width, legend.height,
legend.stack, legend.group.frame, legend.resize.as.group, legend.reverse,
legend.na.show, legend.title.color, legend.title.size, legend.title.fontface,
legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface,
legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface,
legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface,
legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r,
legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait,
legend.settings.standard.landscape, title.show, title.size, title.color,
title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding,
title.frame, title.frame.lwd, title.frame.r, title.stack, title.position,
title.group.frame, title.resize.as.group, credits.show, credits.size, credits.color,
credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha,
credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack,
credits.position, credits.width, credits.heigth, credits.group.frame,
credits.resize.as.group, compass.north, compass.type, compass.text.size,
compass.size, compass.show.labels, compass.cardinal.directions,
compass.text.color, compass.color.dark, compass.color.light, compass.lwd,
compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack,
compass.position, compass.frame, compass.frame.lwd, compass.frame.r,
compass.group.frame, compass.resize.as.group, scalebar.show,
scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color,
scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position,
scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins,
scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r,
scalebar.group.frame, scalebar.resize.as.group, grid.show, grid.labels.pos,
grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha,
grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot,
grid.labels.format, grid.labels.cardinal, grid.labels.margin.x,
grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y,
grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr,
mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show,
panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily,
panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar,
qtm.minimap, qtm.mouse.coordinates, earth.boundary, earth.boundary.color,
earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories,
legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height,
legend.hist.width, attr.outside, attr.outside.position, attr.outside.size,
attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom,
overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed,
text.size.variable, bbox, check.and.fix, set.bounds, set.view, set.zoom.limits, name, basemap.show,
title = NULL,
main.title = NULL,
...
Expand Down
2 changes: 2 additions & 0 deletions R/tmap_options.R
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,7 @@ tm_extra_innner_margin = function(left = 0, right = 0, top = 0, bottom = 0) {
#' @rdname tm_layout
#' @param style name of the style
#' @export
#' @order 1
tm_style = function(style, ...) {
args = list(...)

Expand All @@ -1150,6 +1151,7 @@ tm_style = function(style, ...) {
}

#' @rdname tm_layout
#' @order 2
#' @param format name of the format
#' @export
tm_format = function(format, ...) {
Expand Down
Loading

0 comments on commit f012855

Please sign in to comment.