Learn R Programming

XGR (version 1.1.5)

xPieplot: Function to visualise data frame using pie plots

Description

xPieplot is supposed to visualise data frame using pie plots. It returns an object of class "ggplot".

Usage

xPieplot(df, columns, colormap = "ggplot2", pie.radius = NULL,
pie.color = "transparent", pie.color.alpha = 1, pie.thick = 0.1,
legend.title = "", gp = NULL)

Arguments

df

a data frame

columns

a vector containing column names of the input data frame. These columns are used to draw pie charts

colormap

short name for the colormap. It can be one of "jet" (jet colormap), "bwr" (blue-white-red colormap), "gbr" (green-black-red colormap), "wyr" (white-yellow-red colormap), "br" (black-red colormap), "yr" (yellow-red colormap), "wb" (white-black colormap), "rainbow" (rainbow colormap, that is, red-yellow-green-cyan-blue-magenta), and "ggplot2" (emulating ggplot2 default color palette). Alternatively, any hyphen-separated HTML color names, e.g. "lightyellow-orange" (by default), "blue-black-yellow", "royalblue-white-sandybrown", "darkgreen-white-darkviolet". A list of standard color names can be found in http://html-color-codes.info/color-names

pie.radius

the radius of a pie. If NULL, it equals roughly 1/75

pie.color

the border color of a pie

pie.color.alpha

the 0-1 value specifying transparency of pie border colors

pie.thick

the pie border thickness

legend.title

the legend title

gp

an existing ggplot object or NULL. It is used for overlapping

Value

a ggplot object.

See Also

xPieplot

Examples

Run this code
# NOT RUN {
# Load the library
library(XGR)
# }
# NOT RUN {
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
# }
# NOT RUN {
gp <- xPieplot(df,
columns=c('dGene','pGene','fGene','nGene','eGene','cGene'),
legend.title='Seeds')
# }

Run the code above in your browser using DataLab