Usage
createBubblechart(data, x, y, z, label = z, fill = NULL,
facet = NULL, ncol = 1, facetScales = "fixed",
xlim = NULL, baseSize = 12, baseFamily = "sans",
shape = 21, shapeColour = "black", scaleSize = TRUE,
shapeSizeRange = c(3, 10), shapeMaxSize = 100,
paletteValues = NULL, palette = "Set1",
title = paste("Bubble Chart by", fill), xlab = x,
ylab = y, labelSize = 5, labelFamily = "",
labelFontface = "plain", labelColour = "black",
labelVJust = 0.5, labelHJust = 0.5, labelAlpha = 1,
labelAngle = 0, legendPosition = "right",
defaultTheme = theme_bw(base_size = baseSize, base_family = baseFamily),
themeExtra = NULL)Arguments
data
data frame contains data computed for
bubblechart
x
name of a column containing x variable values
y
name of a column containing y variable values
z
name of a column containing bubble size value
label
name of a column containing bubble label
fill
name of a column with values to use for
bubble colours
facet
vector of 1 or 2 column names to split up
data to plot the subsets as facets. If single name then
subset plots are placed next to each other, wrapping with
ncol number of columns (uses
face ncol
number of facet columns (applies when single
facet column supplied only - see parameter
facet).
facetScales
Are scales shared across all subset
plots (facets): "fixed" - all are the same, "free_x" -
vary across rows (x axis), "free_y" - vary across columns
(Y axis, default), "free" - both rows and columns (see in
facet_wrap parameter
xlim
a vector specifying the data range for the x
scale and the default order of their display in the x
axis.
shapeColour
colour of shapes
scaleSize
logical if TRUE then scale the size of
shape to be proportional to the value, if FALSE then
scale the area.
shapeSizeRange
bubble size range (applies only
when scaleSize = TRUE)
shapeMaxSize
size of largest shape (applies only
when scaleSize = FALSE)
paletteValues
actual palette colours for use with
scale_fill_manual (if specified then parameter
palette is ignored)
palette
Brewer palette name - see
display.brewer.all in RColorBrewer package
for names
xlab
a label for the x axis, defaults to a
description of x.
ylab
a label for the y axis, defaults to a
description of y.
labelFamily
label font name or family name
labelFontface
label font face
(c("plain","bold","italic","bold.italic"))
labelColour
color of labels
labelVJust
position of the anchor (0=bottom edge,
1=top edge), can go below 0 or above 1
labelHJust
position of the label anchor (0=left
edge, 1=right edge), can go below 0 or above 1
labelAlpha
the transparency of the text label
labelAngle
the angle at which to draw the text
label
legendPosition
the position of legends. ("left",
"right", "bottom", "top", or two-element numeric vector).
"none" is no legend.
themeExtra
any additional
theme settings that override
default theme.