Learn R Programming

see (version 0.4.1)

theme_radar: Themes for radar plots

Description

theme_radar() is a light, clear theme for ggplot radar-plots, while theme_radar_dark() is a dark variant of theme_radar().

Usage

theme_radar(
  base_size = 11,
  base_family = "",
  plot.title.size = 12,
  plot.title.face = "plain",
  plot.title.space = 15,
  legend.position = "right",
  axis.title.space = 15,
  legend.title.size = 11,
  legend.text.size = 10,
  axis.title.size = 11,
  axis.title.face = "plain",
  axis.text.size = 10,
  axis.text.angle = NULL,
  tags.size = 11,
  tags.face = "plain"
)

theme_radar_dark( base_size = 11, base_family = "", plot.title.size = 12, plot.title.face = "plain", plot.title.space = 15, legend.position = "right", axis.title.space = 15, legend.title.size = 11, legend.text.size = 10, axis.title.size = 11, axis.title.face = "plain", axis.text.size = 10, axis.text.angle = NULL, tags.size = 11, tags.face = "plain" )

Arguments

base_size

base font size

base_family

base font family

plot.title.size

Title size in pts. Can be "none".

plot.title.face

Title font face ("plain", "italic", "bold", "bold.italic").

plot.title.space

Title spacing.

legend.position

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

axis.title.space

Axis title spacing.

legend.title.size

Legend elements text size in pts.

legend.text.size

Legend elements text size in pts. Can be "none".

axis.title.size

Axis title text size in pts.

axis.title.face

Axis font face ("plain", "italic", "bold", "bold.italic").

axis.text.size

Axis text size in pts.

axis.text.angle

Rotate the x axis labels.

tags.size

Tags text size in pts.

tags.face

Tags font face ("plain", "italic", "bold", "bold.italic").

See Also

coord_radar

Examples

Run this code
# NOT RUN {
if (require("ggplot2") && require("dplyr") && require("tidyr")) {
  data <- iris %>%
    group_by(Species) %>%
    summarise_all(mean) %>%
    pivot_longer(-Species)

  data %>%
    ggplot(aes(
      x = name,
      y = value,
      color = Species,
      group = Species,
      fill = Species
    )) +
    geom_polygon(size = 1, alpha = .1) +
    coord_radar() +
    theme_radar()
}
# }

Run the code above in your browser using DataLab