pointGraph.cgOneFactorData {cg} | R Documentation |
Graph Individual Data Points in a cgOneFactorData object
Description
Create a point graph (a.k.a. dot plot, strip plot, one-dimensional
scatter plot) of the data in a cgOneFactorData
object.
Usage
## S4 method for signature 'cgOneFactorData'
pointGraph(data, ...)
Arguments
data |
A |
... |
Additional arguments, both optional. Two are currently valid:
|
Details
If logscale=TRUE
, the tick marks for the y-axis
on the left side of the plot show original values, while the
tick marks for the y-axis on the right side of the graph
show base 10 log values.
Tick marks are attempted to be chosen wisely. For log-scaled axes in
particular, leading digits of 2, 5, and 10 for values are included if
possible. Since the algorithm is empirical, the ticklabels
argument is available for further refinement or complete replacement
of tickmarks.
Individual points are jitter
ed, and open circles
are used to alleviate potential overlap and the danger of representing
multiple points as a single point.
The point graph is a vertical dot plot or strip plot, with separate areas for each group in the data set, and light gray lines between the groups. For censored data, left-censored values are shown as a shallow "V", which is actually just a rotated downward "<" sign. Similarly, right-censored values are shown as a deeper "^", which is a rotated upward ">" sign.
The heading for the graph is taken from the cgOneFactorData
object,
which prepareCGOneFactorData
sets from its analysisname
argument.
The label for the y-axis is taken from the cgOneFactorData
object,
which prepareCGOneFactorData
sets from its endptname
and endptunits
arguments.
The number of decimal places printed in the ticks on the y-axis is taken
from the cgOneFactorData
object,
which prepareCGOneFactorData
sets from its digits
argument.
The minimum and maximum values from the range of the data are respectively labeled in the bottom and top left corners of the graph region.
If group labels along the x-axis seem to overlap in the standard horizontal form, they will be rotated 45 degrees.
Value
pointGraph.cgOneFactorData
returns
an invisible NULL
. The main purpose is the side
effect of graphing to the current device.
Note
Contact cg@billpikounis.net for bug reports, questions, concerns, and comments.
Author(s)
Bill Pikounis [aut, cre, cph], John Oleynick [aut], Eva Ye [ctb]
Examples
data(canine)
canine.data <- prepareCGOneFactorData(canine, format="groupcolumns",
analysisname="Canine",
endptname="Prostate Volume",
endptunits=expression(plain(cm)^3),
digits=1, logscale=TRUE, refgrp="CC")
canine.fit <- fit(canine.data)
pointGraph(canine.data)
# Graph the data on the original scale instead of the log scale.
pointGraph(canine.data, logscale=FALSE)
## Censored Data
data(gmcsfcens)
gmcsfcens.data <- prepareCGOneFactorData(gmcsfcens, format="groupcolumns",
analysisname="cytokine",
endptname="GM-CSF (pg/ml)",
logscale=TRUE)
pointGraph(gmcsfcens.data)