Learn R Programming

Rokemon (version 0.0.1)

gghealth: HP bar chart

Description

A barchart in the style of a HP bar.

Usage

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

Run this code
# NOT RUN {
gghealth(pokemon[1:10,],"name","base_total",init.size = 5)+
 labs(x="",y="Stats Total")
# }

Run the code above in your browser using DataLab