A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://r-tmap.github.io/tmap/articles/basics_charts below:

tmap basics: charts • tmap

Introduction

Each visual variable (e.g. fill in tm_polygons()) has an additional .chart argument via which charts can be shown:

Chart types Numeric variables

Categorical variable

Bivariate charts

Position

We can update the position of the chart to bottom right (in a separate frame). See vignette about positioning.

Or, in case we would like the chart to be next to the legend, but in a different frame:

tm_shape(World) +
  tm_polygons(
    fill = "press",
    fill.scale = tm_scale_intervals(n=10, values = "scico.hawaii"),
    fill.legend = tm_legend("World Press\nFreedom Index", group.frame = FALSE),
    fill.chart = tm_chart_bar(position = tm_pos_out("center", "bottom", align.v = "top"))) +
    tm_layout(component.stack_margin = .5) +
tm_crs("auto")
#> Warning: Component group arguments, such as `group.frame`, are deprecated as of 4.1.
#> Please use `group_id = "ID"` in combination with `tm_components(frame_combine =
#> FALSE)` instead.

Additional ggplot2 code


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4