gggauge: Title

Description Usage Arguments

View source: R/gggauge.R

Description

Title

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
gggauge(
  gauge_level = NULL,
  type = c("needle", "level"),
  animate = FALSE,
  anim_fps = 10,
  gauge_names = NULL,
  gauge_width = 1/3,
  gauge_colour = "grey70",
  gauge_fill = "transparent",
  needle_colour = "grey50",
  needle_halfwidth = 0.1,
  level_fill = "#008080",
  show_gauge_name = TRUE,
  gauge_name_size = 11,
  gauge_name_colour = "grey20",
  gauge_name_family = NULL,
  gauge_name_face = NULL,
  gauge_name_spacer = 2,
  plot_ticks = TRUE,
  tick_length = 0.05,
  tick_colour = "grey70",
  plot_tick_labels = TRUE,
  tick_label_colour = "grey50",
  tick_label_size = 4,
  ticks_fill = NULL,
  rm_obscured_labels = TRUE,
  limits = c(NA, NA),
  num_breaks = 11,
  breaks = NULL,
  ...
)

Arguments

gauge_level

The value for the gauge to point to. If more than one value is given, one gauge will be plotted for each value.

type

The type of gauge to plot. 'needle' plots a gauge with a needle pointing the value. 'level' plots a gauge that is filled to the value.

animate

Logical. If more than one value is given in gauge_value, and animate = TRUE, an animated gif of the gauge will be returned. Requires the R package 'gganimate' and the 'gifski' library.

anim_fps

The number of frames per second for the animation.

gauge_names

The names of the gauges. If set to NULL each gauge is given a number starting from 1 to the length of gauge_level.

gauge_width

The width of the gauge as a fraction of the radius of the gauge.

gauge_colour

The outline colour for the gauge.

gauge_fill

The fill colour for the gauge.

needle_colour

The colour of the needle of the gauge if type = "needle".

needle_halfwidth

The needle is an isosceles triangle so this is the width of half of that triangle. Note that the radius of the whole gauge is equal to 1.

level_fill

The fill colour when type = "level". If more than one level is given in gauge_level and there are fewer colours specified in level_fill, colours will be recycled.

show_gauge_name

Logical. Whether to show the name of the gauge aboove each gauge.

gauge_name_size

The font size for gauge names.

gauge_name_colour

The font colour for gauge names.

gauge_name_family

The font family for gauge names.

gauge_name_face

The font face for gauge names.

gauge_name_spacer

When the gauge_name_size becomes large, the bottom of the text may be cut off. To prevent this from happening you can increase the value here to get a larger margin.

plot_ticks

Logical. Whether to plot tick marks.

tick_length

The length of the tick marks.

tick_colour

The colour of the tick marks.

plot_tick_labels

Logical. Whether to plot tick labels.

tick_label_colour

The colour of the tick labels.

tick_label_size

The size of the tick labels.

ticks_fill

For type = "needle", the fill colour of the gauge can be changed between each tick mark. If there is one fewer colours than the number of breaks, those colours will be used, otherwise colours will be interpolated so that there are one fewer colours than the number of breaks.

rm_obscured_labels

Logical. Labels at the start and end of the gauge are obscured by the gauge outline. Set to TRUE (the default) to not show these labels.

limits

The limits of the gauge. Should be a numeric vector of length 2. Set to NA to use the data.

num_breaks

The number of breaks in the gauge. A set of breaks will be determined using either the values set in limits or from the data using the pretty. Ignored if breaks is not NULL.

breaks

Explicit breaks.

...

Not used.


andrew-MET/gggauge documentation built on March 21, 2020, 7:01 p.m.