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
-
emptyPlot
generates an empty plot. -
plot_error
adds line with (shaded) confidence interval. -
add_bars
adds bars to a (bar)plot. -
errorBars
adds confidence intervals to points or bars.
Specialized plots
-
color_contour
andplotsurface
are wrappers aroundimage
andcontour
for making easily colored surface plots for interactions with two (or more) continuous predictors. -
plot_image
can be used to add a picture to a plot, or to make a picture the background of a plot. -
marginDensityPlot
adds distributions in the margins of the plot. -
check_normaldist
overlays density of data to normal distribution. Might help with interpretation of QQ-plots that are generally used to test for normality.
Other useful features
-
alpha
andalphaPalette
are simple function to make colors and palettes transparent. -
legend_margin
adds a legend in the margins of a plot. -
gradientLegend
adds a color legend to a plot. -
drawDevArrows
for drawing arrows or lines between different panels. -
getFigCoords
retrieve 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