fig_pairsbar: Bar plot with two groups separated

Description Usage Arguments Examples

View source: R/figure_bar_paris.R

Description

Bar plot with two groups separated

Usage

1
2
3
4
fig_pairsbar(rawdata, ishorizontal = T, labelspan.num = 1,
  labelspan.lab = 0.1, num.size = 4, label.size = 5,
  decreasing = T, bar.width = 0.9, colors = c("#F1B255", "#51A047"),
  title = "", subtitle.left = "", subtitle.right = "")

Arguments

rawdata

A data frame with values in paris, which should contain three columns names 'num_left','num_right' and 'labs'(the labels of each pairs).

ishorizontal

Boolean value with default of FALSE, used to deside whether should the figure be plot horizontal.

labelspan.num

The space between num label of bars.

labelspan.lab

The space between labels of bars.

num.size

Size of num label.

label.size

Size of label text.

decreasing

Boolean value with default of FALSE, used to deside whether the bars should ordered in decrease or not.

bar.width

With of bar.

colors

A vectior contains two values of colors which defines the color of bars.

title

The title of the figure.

subtitle.left

The title of the bars in the left part.

subtitle.right

The title of the bars in the right part.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rawdata <- data.frame(
  num_left = iris$Sepal.Length[iris$Species == 'setosa'][1:15],
  num_right = iris$Sepal.Length[iris$Species == 'versicolor'][1:15],
  labs = paste('id', 1:15,sep = '-')
)
fig_pairsbar(rawdata, labelspan.num = 0.5, labelspan.lab = 0.8)

fig_pairsbar(rawdata, labelspan.num = 0.5, labelspan.lab = 0.8, ishorizontal = FALSE)

fig_pairsbar(rawdata, labelspan.num = 0.5, labelspan.lab = 0.8, ishorizontal = FALSE,
             bar.width = 0.7)

purplezippo/ggpkt documentation built on May 21, 2019, 10:34 a.m.