View source: R/plot.misty.object.R
| plot.misty.object | R Documentation |
This function plots an misty.object object.
## S3 method for class 'misty.object'
plot(x, plot = x$args$plot, bar = x$args$bar,
box = x$args$box, violin = x$args$violin, hist = x$args$hist,
point = x$args$point, line = x$args$line, ci = x$args$ci,
conf.level = x$args$conf.level, adjust = x$args$adjust,
jitter = x$args$jitter, density = x$args$density,
square = x$args$square, rotate = x$args$rotate,
binwidth = x$args$binwidth, bins = x$args$bins,
fill = x$args$fill, hist.alpha = x$args$hist.alpha,
tile.alpha = x$args$tile.alpha, violin.alpha = x$args$violin.alpha,
violin.trim = x$args$violin.trim, box.width = x$args$box.width,
box.alpha = x$args$box.alpha, linetype = x$args$linetype,
linewidth = x$args$linewidth, line.col = x$args$line.col,
intercept = x$args$intercept, density.col = x$args$density.col,
density.linewidth = x$args$density.linewidth,
density.linetype = x$args$density.linetype,
point.size = x$args$point.size, point.linewidth = x$args$point.linewidth,
point.linetype = x$args$point.linetype,
point.shape = x$args$point.shape, point.col = x$args$point.col,
ci.col = x$args$ci.col, ci.linewidth = x$args$ci.linewidth,
ci.linetype = x$args$ci.linetype, errorbar.width = x$args$errorbar.width,
dodge.width = x$args$dodge.width, jitter.size = x$args$jitter.size,
jitter.width = x$args$jitter.width, jitter.height = x$args$jitter.height,
jitter.alpha = x$args$jitter.alpha, gray = x$args$gray,
start = x$args$start, end = x$args$end, color = x$args$color,
xlab = x$args$xlab, ylab = x$args$ylab,
xlim = x$args$xlim, ylim = x$args$ylim,
xbreaks = x$args$xbreaks, ybreaks = x$args$ybreaks,
axis.title.size = x$args$axis.title.sizes,
axis.text.size = x$args$axis.text.size,
strip.text.size = x$args$strip.text.size, title = x$args$title,
subtitle = x$args$subtitle, group.col = x$args$group.col,
plot.margin = x$args$plot.margin, legend.title = x$args$legend.title,
legend.position = x$args$legend.position,
legend.box.margin = x$args$legend.box.margin,
legend.key.size = x$args$legend.key.size,
legend.text.size = x$args$legend.text.size,
facet.ncol = x$args$facet.ncol, facet.nrow = x$args$facet.nrow,
facet.scales = x$args$facet.scales, filename = x$args$filename,
width = x$args$width, height = x$args$height, units = x$args$units,
dpi = x$args$dpi, check = TRUE, ...)
x |
|
plot |
see 'Details' |
bar |
see 'Details' |
box |
see 'Details' |
violin |
see 'Details' |
hist |
see 'Details' |
point |
see 'Details' |
line |
see 'Details' |
ci |
see 'Details' |
conf.level |
see 'Details' |
adjust |
see 'Details' |
jitter |
see 'Details' |
density |
see 'Details' |
square |
see 'Details' |
rotate |
see 'Details' |
binwidth |
see 'Details' |
bins |
see 'Details' |
fill |
see 'Details' |
hist.alpha |
see 'Details' |
tile.alpha |
see 'Details' |
violin.alpha |
see 'Details' |
violin.trim |
see 'Details' |
box.width |
see 'Details' |
box.alpha |
see 'Details' |
linetype |
see 'Details' |
linewidth |
see 'Details' |
line.col |
see 'Details' |
intercept |
see 'Details' |
density.col |
see 'Details' |
density.linewidth |
see 'Details' |
density.linetype |
see 'Details' |
point.size |
see 'Details' |
point.linewidth |
see 'Details' |
point.linetype |
see 'Details' |
point.shape |
see 'Details' |
point.col |
see 'Details' |
ci.col |
see 'Details' |
ci.linewidth |
see 'Details' |
ci.linetype |
see 'Details' |
errorbar.width |
see 'Details' |
dodge.width |
see 'Details' |
jitter.size |
see 'Details' |
jitter.width |
see 'Details' |
jitter.height |
see 'Details' |
jitter.alpha |
see 'Details' |
gray |
see 'Details' |
start |
see 'Details' |
end |
see 'Details' |
color |
see 'Details' |
xlab |
see 'Details' |
ylab |
see 'Details' |
xlim |
see 'Details' |
ylim |
see 'Details' |
xbreaks |
see 'Details' |
ybreaks |
see 'Details' |
axis.title.size |
see 'Details' |
axis.text.size |
see 'Details' |
strip.text.size |
see 'Details' |
title |
see 'Details' |
subtitle |
see 'Details' |
group.col |
see 'Details' |
plot.margin |
see 'Details' |
legend.title |
see 'Details' |
legend.position |
see 'Details' |
legend.box.margin |
see 'Details' |
legend.key.size |
see 'Details' |
legend.text.size |
see 'Details' |
facet.ncol |
see 'Details' |
facet.nrow |
see 'Details' |
facet.scales |
see 'Details' |
filename |
a character string indicating the |
width |
a numeric value indicating the |
height |
a numeric value indicating the |
units |
a character string indicating the |
dpi |
a numeric value indicating the |
check |
logical: if |
... |
further arguments passed to or from other methods. |
This function provides plotting arguments depending on the type of the output
object specified for the argument x:
aov.b, aov.w, and test.welch FunctionThe plot function for the misty object of type "aov.b", "aov.w",
and "test.welch" has following plotting arguments:
bar: logical: if TRUE (default), bars representing means
for each groups are drawn. Note that this argument is only available for the
misty object of type "aov.b" and "test.welch".
point: logical: if TRUE, points representing means for
each groups are drawn.
line: logical: if TRUE (default), a line connecting means
of each groups and lines connecting data points are drawn
when jitter = TRUE. Note that this argument is only available for
misty object of type "aov.w".
ci: logical: if TRUE (default), error bars representing
confidence intervals are drawn.
jitter: jittered data points are drawn. Note that subject-specific
lines are also drawn for the "aov.w" function when line = TRUE.
conf.level: a numeric value between 0 and 1 (default: 0.95) indicating
the confidence level of the interval.
adjust: logical: if TRUE (default), difference-adjustment
for the confidence intervals in a two-sample design is applied.
point.size: a numeric value indicating the size (default:
3) aesthetic for the point representing the mean value.
line.width: a numeric value (default: 0.5) indicating
the linewidth aesthetic for the line connecting means of each Groups.
Note that this argument is only available for the "aov.w" function.
errorbar.width: a numeric value (default: 0.1) indicating
the horizontal bar width of the error bar.
jitter.size: a numeric value (default: 1.25) indicating
the size aesthetic for the jittered data points.
jitter.width: a numeric value (default: 0.05) indicating
the amount of horizontal jitter.
jitter.height: a numeric value (default: 0) indicating
the amount of vertical jitter.
jitter.alpha: a numeric value between 0 and 1 (default: 0.1)
for specifying the alpha argument in the geom_jitter function
for controlling the opacity of the jittered data points.
xlab: a character string (default: NULL) specifying the
labels for the x-axis.
ylab: a character string (default: "y") specifying the
labels for the y-axis.
ylim: a numeric vector of length two (default: NULL)
specifying limits of the limits of the y-axis.
ybreaks: a numeric vector (default: waiver()) specifying
the points at which tick-marks are drawn at the y-axis.
title: a character string (default: "") specifying the
text for the title for the plot.
subtitle: a character string (default: "Two-Sided Confidence Interval"
when adjust = FALSE or "Two-Sided Difference-Adjusted Confidence Interval"
for the aov.b function and
"Two-Sided Difference-Adjusted Cousineau-Morey Confidence Interval Confidence Interval"
for the aov.w function when adjust = TRUE) specifying the text
for the subtitle for the plot.
filename: character string indicating the filename
argument including the file extension in the ggsave function.
width: a numeric value indicating the width argument
for the ggsave function.
height: a numeric value indicating the height argument
for the ggsave function.
dpi: a numeric value indicating the dpi argument for
the ggsave function.
units: a character string (default: "in") indicating
the units argument (default: in) for the ggsave
function.
ci.* FunctionsThe plot
function for the misty object of type "ci.cor", "ci.mean",
"ci.median", "ci.prop", "ci.var", and "ci.sd" has
following plotting arguments:
plot: a character string indicating the type of the plot
to display, i.e., "ci" (default) for displaying confidence intervals
or "boot" for displaying bootstrap samples with histograms and density
curves when the argument.
hist: logical: if TRUE (default), histograms are
drawn when plot = "boot".
density: logical: if TRUE (default), density curves are
drawn when plot = "boot".
point: logical: if TRUE (default), vertical lines
representing the point estimate are drawn when plot = "boot".
ci: logical: if TRUE (default), vertical lines
representing the bootstrap confidence intervals are drawn when plot = "boot".
line: logical: if TRUE (default), a horizontal line
is drawn when plot = "ci" or a vertical line is drawn when
plot = "boot".
point.size: a numeric value (default: 2.5) indicating
the size argument in the geom_point function for controlling
the size of points when plotting confidence intervals (plot = "ci").
point.shape: a numeric value between 0 and 25 (default: 19)
or a character string as plotting symbol indicating the shape argument
in the geom_point function for controlling the symbols of points
when plotting confidence intervals (plot = "ci").
errorbar.width: a numeric value (default: 0.3) indicating
the width argument in the geom_errorbar function for controlling
the width of the whiskers in the geom_errorbar function when plotting
confidence intervals (plot = "ci").
dodge.width: a numeric value (default: 0.5) indicating
the width argument controlling the width of the geom elements
to be dodged when specifying a grouping variable using the argument group
when plotting confidence intervals (plot = "ci").
binwidth: a numeric value or a function (default: NULL)
for specifying the
bins: a numeric value for specifying the
bins argument in the geom_histogram function for controlling
the number of bins when plotting bootstrap samples (plot = "boot").
hist.alpha: a numeric value between 0 and 1 (default: 0.4)
for specifying the alpha argument in the geom_histogram
function for controlling the opacity of the bars when plotting bootstrap
samples (plot = "boot").
fill: a character string (default: "gray85") specifying
the fill argument in the geom_histogram function controlling
the fill aesthetic when plotting bootstrap samples (plot = "boot").
Note that this argument applied only when no grouping variable was specified
group = NULL.
density.col: a character string (default: "#0072B2")
specifying the color argument in the geom_density function
controlling the color of the density curves when plotting bootstrap samples
(plot = "boot"). Note that this argument applied only when no grouping
variable was specified group = NULL.
density.linewidth: a numeric value (default: 0.5) specifying
the linewidth argument in the geom_density function controlling
the line width of the density curves when plotting bootstrap samples
(plot = "boot").
density.linetype: a numeric value or character string (default:
0.5) specifying the linetype argument in the geom_density
function controlling the line type of the density curves when plotting
bootstrap samples (plot = "boot").
point.col: a character string (default: "#CC79A7") specifying
the color argument in the geom_vline function for controlling
the color of the vertical line displaying the point estimate when plotting
bootstrap samples (plot = "boot"). Note that this argument applied
only when no grouping variable was specified group = NULL.
point.linewidth: a numeric value (default: 0.6) specifying
the linewdith argument in the geom_vline function for
controlling the line width of the vertical line displaying the point estimate
when plotting bootstrap samples (plot = "boot").
point.linetype: a numeric value or character string (default:
"solid") specifying the linetype argument in the geom_vline
function controlling the line type of the vertical line displaying the
point estimate when plotting bootstrap samples (plot = "boot").
ci.col: character string (default: "black") specifying the
color argument in the geom_vline function for controlling the
color of the vertical line displaying bootstrap confidence intervals when
plotting bootstrap samples (plot = "boot"). Note that this argument
applied only when no grouping variable was specified group = NULL.
ci.linewidth: a numeric value (default: 0.6) specifying
the linewdith argument in the geom_vline function for controlling
the line width of the vertical line displaying bootstrap confidence intervals
when plotting bootstrap samples (plot = "boot").
ci.linetype: a numeric value or character string (default:
"dashed") specifying the linetype argument in the geom_vline
function controlling the line type of the vertical line displaying bootstrap
confidence intervals when plotting bootstrap samples (plot = "boot").
intercept: a numeric value (default = 0) indicating the
yintercept or xintercept argument in the geom_hline
or geom_vline function controlling the position of the horizontal
or vertical line when plot = "ci" and line = TRUE or when
plot = "boot" and line = TRUE.
linetype: a character string (default: "solid") indicating
the linetype argument in the geom_hline or geom_vline
function controlling the line type of the horizontal or vertical line
line.col: a character string (default: "gray65") indicating
the color argument in the geom_hline or geom_vline
function for controlling the color of the horizontal or vertical line.
xlab: a character string indicating the name argument
in the scale_x_continuous function for labeling the x-axis. The default
setting is xlab = NULL when plot = "ci" and
xlab = "Correlation Coefficient", xlab = "Arithmetic Mean",
xlab = "Median", xlab = "Proportion", xlab = "Variance",
or xlab = "Standard Deviation".
ylab: a character string indicating the name argument
in the scale_y_continuous function for labeling the y-axis. The
default setting is ylab = "Correlation Coefficient", ylab = "Arithmetic Mean",
ylab = "Median", ylab = "Proportion", ylab = "Variance",
or ylab = "Standard Deviation" when plot = "ci" and
ylab = "Probability Density f(x)" when plot = "boot".
xlim: a numeric vector with two elements indicating the
limits argument in the scale_x_continuous function for controlling
the scale range of the x-axis. The default setting is xlim = NULL
when plot = "ci" and xlim = c(-1, 1) for the correlation
coefficient and proportion or xlim = NULL) for the arithmetic mean,
median, variance and standard deviation when plot = "boot".
ylim: a numeric vector with two elements indicating the
limits argument in the scale_y_continuous function for controlling
the scale range of the y-axis. The default setting is ylim = c(-1, 1)
fpr the correlation coefficient and proportion and ylim = NULL for
the arithmetic mean, median, variance and standard deviation when plot = "ci"
and xlim = NULL when plot = "boot".
xbreaks: a numeric vector (default: waiver()) indicating
the breaks argument in the scale_x_continuous function for
controlling the x-axis breaks.
ybreaks: a numeric vector (default: waiver()) indicating
the breaks argument in the scale_y_continuous function for
controlling the y-axis breaks.
axis.title.size: a numeric value (default: 11) indicating
the size argument in the element_text function for specifying
the function controlling the font size of the axis title, i.e.
theme(axis.title = element_text(size = axis.text.size))
axis.text.size: a numeric value (default: 10) indicating the
size argument in the element_text function for specifying the
function controlling the font size of the axis text,
i.e. theme(axis.text = element_text(size = axis.text.size)).
strip.text.size: a numeric value (default: 11) indicating
the size argument in the element_text function for specifying
the function controlling the font size of the strip text, i.e.
theme(strip.text = element_text(size = strip.text.size)).
title: a character string (default: NULL) indicating the
title argument in the labs function for the subtitle of the
plot.
subtitle: a character string (default: NULL) indicating
the subtite argument in the labs function for the subtitle of
the plot.
group.col: a character vector (default: NULL) indicating
the color argument in the scale_color_manual and scale_fill_manual
functions when specifying a grouping variable using the argument group.
plot.margin: a numeric vector (default: NA) with four
elements indicating the plot.margin argument in the theme function
controlling the plot margins. The default setting is c(5.5, 5.5, 5.5, 5.5)
but switches to c(5.5, 5.5, -2.5, 5.5) when specifying a grouping
variable using the argument group.
legend.title: a character string (default: "") indicating
the color argument in the labs function for specifying the
legend title when specifying a grouping variable using the argument group.
legend.position: a character string (default: "bottom")
indicating the legend.position in the theme argument for
controlling the position of the legend function when specifying a
grouping variable using the argument group.
legend.box.margin: a numeric vector (default: c(-10, 0, 0, 0))
with four elements indicating the legend.box.margin argument in the
theme function for controlling the margins around the full legend
area when specifying a grouping variable using the argument group.
facet.ncol: a numeric value (default: NULL) indicating the
ncol argument in the facet_wrap function for controlling the
number of columns when specifying a split variable using the argument split.
facet.nrow: a numeric value (default: NULL) indicating the
nrow argument in the facet_wrap function for controlling the
number of rows when specifying a split variable using the argument split.
facet.scales: a character string (default: "free_y") indicating
the scales argument in the facet_wrap function for controlling the
scales shared across facets i.e. "fixed", "free_x",
"free_y" (default) or "free" when specifying a split variable
using the argument split.
filename: character string indicating the filename
argument including the file extension in the ggsave function.
width: a numeric value indicating the width argument
for the ggsave function.
height: a numeric value indicating the height argument
for the ggsave function.
dpi: a numeric value indicating the dpi argument for
the ggsave function.
units: a character string (default: "in") indicating
the units argument (default: in) for the ggsave
function.
test.levene FunctionThe plot
function for the misty object of type "test.levene" has following plotting
arguments:
violin.alpha: a numeric value between 0 and 1 (default: 0.3)
for specifying the alpha argument in the geom_violin function
for controlling the opacity of the violins.
violin.trim: logical: if TRUE (default: FALSE),
the tails of the violins to the range of the data is trimmed.
box.alpha: a numeric value between 0 and 1 (default: 0.2)
for specifying the alpha argument in the geom_boxplot function
for controlling the opacity of the boxplots.
box.width: a numeric value between 0 and 1 (default: 0.2)
for specifying the alpha argument in the geom_boxplot function
for controlling the opacity of the boxplots.
jitter.size: a numeric value (default: 1.25) indicating
the size aesthetic for the jittered data points.
jitter.width: a numeric value (default: 0.05) indicating
the amount of horizontal jitter.
jitter.height: a numeric value (default: 0) indicating
the amount of vertical jitter.
jitter.alpha: a numeric value between 0 and 1 (default: 0.2)
for specifying the alpha argument in the geom_jitter function
for controlling the opacity of the jittered data points.
start: a numeric value between 0 and 1 (default: 0.9),
graphical parameter to specify the gray value at the low end of the palette.
end: a numeric value between 0 and 1 (default: 0.4),
graphical parameter to specify the gray value at the high end of the palette.
color: a character vector (default: NULL), indicating
the color of the violins and the boxes. By default, default ggplot2 colors
are used.
xlab: a character string (default: NULL) specifying
the labels for the x-axis.
ylab: a character string (default: NULL) specifying
the labels for the y-axis.
ylim: a numeric vector (default: NULL) of length two specifying
limits of the limits of the y-axis.
ybreaks: a numeric vector (default: waiver())
specifying the points at which tick-marks are drawn at the y-axis.
title: a character string (default: "") specifying the
text for the title for the plot.
subtitle: a character string (default: "") specifying
the text for the subtitle for the plot.
filename: character string indicating the filename
argument including the file extension in the ggsave function.
width: a numeric value indicating the width argument
for the ggsave function.
height: a numeric value indicating the height argument
for the ggsave function.
dpi: a numeric value indicating the dpi argument for
the ggsave function.
units: a character string (default: "in") indicating
the units argument (default: in) for the ggsave
function.
test.t and test.z FunctionThe plot function for the misty object of type "test.t" and
"test.z" has following plotting arguments:
bar: logical: if TRUE (default), bars representing means for
each groups are drawn.
point: logical: if TRUE, points representing means for
each groups are drawn.
ci: logical: if TRUE (default), error bars representing confidence
intervals are drawn.
jitter: logical: if TRUE, jittered data points are drawn.
line: logical: if TRUE (default), a horizontal line is drawn at
mu for the one-sample t- or z-test or at 0 for the paired-sample
t- or z-test.
conf.level: a numeric value between 0 and 1 (default: 0.95) indicating
the confidence level of the interval.
adjust: logical: if TRUE (default), difference-adjustment
for the confidence intervals in a two-sample design is applied.
point.size: a numeric value indicating the size (default:
3) aesthetic for the point representing the mean value.
errorbar.width: a numeric value (default: 0.1) indicating
the horizontal bar width of the error bar.
linetype: an integer value or character string (default: 3)
specifying the line type for the line representing the population mean under
the null hypothesis, i.e., 0 = blank, 1 = solid, 2 = dashed, 3 = dotted,
4 = dotdash, 5 = longdash, or 6 = twodash.
linewidth: a numeric value indicating the linewidth
(default: 0.8 aesthetic for the line representing the population mean
under the null hypothesis.
jitter.size: a numeric value (default: 1.25) indicating
the size aesthetic for the jittered data points.
jitter.width: a numeric value (default: 0.05) indicating
the amount of horizontal jitter.
jitter.height: a numeric value (default: 0) indicating
the amount of vertical jitter.
jitter.alpha: a numeric value between 0 and 1 (default: 0.1)
for specifying the alpha argument in the geom_jitter function
for controlling the opacity of the jittered data points.
xlab: a character string (default: NULL) specifying the
labels for the x-axis.
ylab: a character string (default: "y") specifying the
labels for the y-axis.
ylim: a numeric vector of length two (default: NULL)
specifying limits of the limits of the y-axis.
ybreaks: a numeric vector (default: waiver()) specifying
the points at which tick-marks are drawn at the y-axis.
title: a character string (default: "") specifying the
text for the title for the plot.
subtitle: a character string (default: "Two-Sided Confidence Interval"
when adjust = FALSE or "Two-Sided Difference-Adjusted Confidence Interval"
when adjust = TRUE) specifying the text for the subtitle for the plot.
filename: character string indicating the filename
argument including the file extension in the ggsave function.
width: a numeric value indicating the width argument
for the ggsave function.
height: a numeric value indicating the height argument
for the ggsave function.
dpi: a numeric value indicating the dpi argument for
the ggsave function.
units: a character string (default: "in") indicating
the units argument (default: in) for the ggsave
function.
Takuya Yanagida takuya.yanagida@univie.ac.at
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.