Create a QTL bubble plot
createQtlBubblePlot.RdCreate a QTL bubble plot
Usage
createQtlBubblePlot(
d,
x,
y,
size,
group = NULL,
limits = NULL,
summarise = FALSE,
summarize = summarise,
stat = NULL,
jitterHeight = 0,
jitterWidth = NULL,
showBox = TRUE,
boxFill = "steelblue2",
boxColour = boxFill,
boxColor = boxColour,
boxAlpha = 0.25,
boxWidth = 0.5,
showLegend = TRUE,
...
)Arguments
- d
the data frame containing the data to be plotted
- x
<
data-masked> the column indatathat should appear on the x-axis- y
<
data-masked> the column indatathat should appear on the y-axis- size
<
data-masked> the column indatathat defines the size of the bubbles- group
<
data-masked> Default:NULLthe column indatathat defines the fill colour of the bubbles- limits
Default:
NULLalistdefining the characteristics of the horizontal reference lines that should appear on the plot. See Usage notes below.- summarise
Default:
FALSEShould the input data frame be summarised to derive the plotted statistics? See Usage notes below- summarize
Default:
summariseA US English equivalent tosummarise- stat
Default:
NULLThe summary function to be used to summarise the data. Cannot beNULLifsummariseisTRUE. See Usage notes below- jitterHeight
Default:
0. Value of theheightparameter in the call togeom_jitter. The default value implies no vertical jittering.- jitterWidth
Default:
NULL. Value of thewidthparameter in the call togeom_jitter. The default value implies a 40% horizontal jitter.- showBox
Default:
TRUEshow an unjittered box-and-whisker plot at each value ofx?.- boxFill
Default:
"steelblue2": the colour with which the box-and-whisker plot is filled- boxColour
Default:
boxFill: the colour with which the outline of the box-and-whisker plot is drawn- boxColor
Default:
boxColour: US-English version ofboxColour- boxAlpha
Default:
0.25The transparency of the box-and-whisker plot. Ifalpha=0, the box is invisible. Ifalpha=1, the box is totally opaque.- boxWidth
Default:
0.5The width of each box in the box-and-whisker plot, in the same units as those used on the x-axis- showLegend
Default:
TRUEShould the legend defined bygroupappear in the plot- ...
additional parameters passed to
ggplot2functions andstat
Usage notes
limits should be a list of lists, each element of which defines the label (default ""), colour (default "black"), line type (default "solid"), y co-ordinate (default 1), x co-ordinate (default 0), and vertical offset (vjust) (default -1) of a reference line. If any element of the component lists is missing, a warning is issued and a default value supplied. For example: limits=list(list(label="QTL (12%)", colour="red", type="dashed", y=12, x=1.5, vjust=-1),list(label="Sec Lim (8%)", colour="goldenrod", type="dotted", y=58, x=1.25, vjust=-1))
If summarise is TRUE, the (participant-level) information in data is summarised before the plot is created. data is grouped by group and x and then y=stat(y) and size=sum(size) are calculated, where x, y, size and stat are the parameters defined above.