gghealth: HP bar chart

Description Usage Arguments Details Examples

View source: R/healthbar.R

Description

A barchart in the style of a HP bar.

Usage

1
2
gghealth(data, names, values, sort.names = TRUE, init.size = 3,
  cuts = c(0.8, 0.4, 0.2))

Arguments

data

data.frame.

names

column name of names to use in the plot.

values

column name of values to plot.

sort.names

order names according to value (TRUE, default) or not (FALSE).

init.size

size of the healthbar. See details.

cuts

numeric vector of length 3. See details.

Details

init.size controls the height of the bar. The more names are used, the smaller the value should be. The values in cuts should be decreasing in the interval (0,1).

Examples

1
2
3
4
5
## Not run: 
gghealth(pokemon[1:10,],"name","base_total",init.size = 5)+
 labs(x="",y="Stats Total")

## End(Not run)

schochastics/Rokemon documentation built on Jan. 16, 2022, 2:52 a.m.