| plotfunctions {plotfunctions} | R Documentation |
Package plotfunctions: Various Functions to Facilitate Visualization of Data and Analysis
Description
This package provides a set of simple tools for building plots incrementally, starting with an empty plot region, and adding bars, data points, regression lines, error bars, gradient legends, density distributions in the margins, and even pictures. The package builds further on R graphics by simply combining functions and settings in order to reduce the amount of code to produce for the user. As a result, the package does not use formula input or special syntax, but can be used in combination with default R plot functions.
Details
Note: Most of the functions were part of the package itsadug, which is now
split in two packages: 1. the package itsadug, which contains the
core functions for visualizing and evaluating nonlinear regression models,
and 2. the package plotfunctions, which contains more general plot
functions.
See vignette(package='plotfunctions', 'plotfunctions') for an
overview with examples.
Basic functions
-
emptyPlotgenerates an empty plot. -
plot_erroradds line with (shaded) confidence interval. -
add_barsadds bars to a (bar)plot. -
errorBarsadds confidence intervals to points or bars.
Specialized plots
-
color_contourandplotsurfaceare wrappers aroundimageandcontourfor making easily colored surface plots for interactions with two (or more) continuous predictors. -
plot_imagecan be used to add a picture to a plot, or to make a picture the background of a plot. -
marginDensityPlotadds distributions in the margins of the plot. -
check_normaldistoverlays density of data to normal distribution. Might help with interpretation of QQ-plots that are generally used to test for normality.
Other useful features
-
alphaandalphaPaletteare simple function to make colors and palettes transparent. -
legend_marginadds a legend in the margins of a plot. -
gradientLegendadds a color legend to a plot. -
drawDevArrowsfor drawing arrows or lines between different panels. -
getFigCoordsretrieve the cartesian coordinates relative to the plot axes for given proportions of the plot region or given proportions of the figure. #' A list of all available functions is provided in
help(package='itsadug').
Author(s)
Jacolien van Rij
Maintainer: Jacolien van Rij (vanrij.jacolien@gmail.com)
University of Groningen, The Netherlands & University of Tuebingen, Germany