Conditional Visualization for Statistical Models

Exploring fitted models by interactively taking 2-D and 3-D sections in data space.

BuildStatus License CRAN Downloads

Interactively exploring fitted models

Interactively take 2-D and 3-D sections in data space, showing where fitted
models intersect the section, and observed data near the section according to
a distance measure. See package website for examples.

Works on Windows, Mac OS and Linux.


  • Windows: the standard graphics device is sufficient.
  • Mac OS: XQuartz device, website
  • Linux: X11, included in some distributions.



Example to get started:

m <- lm(mpg ~ wt + hp, data = mtcars)
ceplot(data = mtcars, model = m, sectionvars = "hp")


condvis: Conditional Visualisation for Statistical Models


Version 0.5-1 2018-09-13

  • Changed check for zero variance (introduced in 0.5-0) to work for factors.
  • Fixed S3 method treatment for interpolate.

Version 0.5-0 2018-09-01

  • Fixed bug where arrangeC would return pairs of the same variable if there were no bivariate relationships detected by savingby2d.
  • Added a generic function interpolate, with methods for standard data types.
  • Added an error for negative threshold dissimilarities in similarityweight.
  • Fixed bug where variables with zero variance caused an error in similarityweight.

Version 0.4-3 2017-10-19

  • Fixed bug where ceplot.shiny dropped xc.cond to a vector and threw an error.

Version 0.4-2 2017-10-11

  • New release for JSS publication. Small changes to documentation, and some default colours have been changed.

Version 0.4-0 2016-10-17

  • The 2-D histogram in plotxc has been made optional, and also allows a cap on the bin counts, to allow for skewed data.
  • In similarityweight, the weight values are no longer discretised. All values between 0 and 1 are allowed.
  • New unexported function weightcolor used to weight colours using similarity weight.
  • Fixed bug; not passing pch to snapshot for ceplot.interactive.

Version 0.3-5 2016-09-26

  • In plotxc, can chop off long tails for scatterplot/2-d histogram, controlled by trim parameter.
  • pass plotting parameters for models from top-level ceplot call. See parameter modelpar.
  • allow xlim and ylim to be passed to section plot produced by plotxs.
  • corrected typo in ?similarityweight, sigma --> threshold.
  • added snapshot feature to condtour.
  • changed treatment of conditioning predictors in condtour to be more like ceplot, plus a hacky fix to update.xcplot for condtour providing predictor values instead of mouseclicks.
  • corrected problem in condtour, where interpolated path omitted the final row. Also removed rownames from cluster centres.
  • diagnostic plot for condtour, plotap now shows approximate proportion of data visible, rather than approximate number of observations visible.

Version 0.3-4 2016-08-04

  • fixed incorrect parameter names in demo files.
  • fix to plotxs to allow main and mar to be specified.

Version 0.3-3 2016-07-04

  • fixed treatment of pch by condtour, was previously defaulting to 1 when it should have been 21 for background colours.
  • can now adjust threshold while using condtour.
  • added help link for rsconnect package in Shiny application.
  • added fix to update.xsplot where the fitted model was not updating properly, due to the section information remaining static.

Version 0.3-2

  • fixed bug with rep for col and pch where length.out was omitted, causing huge delays for plotxs.

Version 0.3-1

  • removed test which timed similarityweight (for CRAN)

Version 0.3-0 2016-07-01

  • removed daisy distance measure, and relevant contributors.
  • renamed visualweight to similarityweight and changed parameter names.
  • renamed parameters in ceplot.
  • Shiny implementation completely rewritten, see R/ceplot.shiny.R.
  • added Roxygen comments for documentation of exported functions.
  • added update methods to parallel coordinates and scatterplot matrix condition selector plots.
  • condtour can now handle mixed data (categorical and continuous).

Version 0.2-2 2016-05-01

  • updated contributors for copied code.
  • added simple example to README.

Version 0.2-1 23 Feb 2016

  • initial release on CRAN.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.5-1 by Mark O'Connell, 3 years ago

Report a bug at

Browse source code at

Authors: Mark O'Connell [aut, cre] , Catherine Hurley [aut] , Katarina Domijan [aut] , Achim Zeileis [ctb] (spineplot , see copied.R) , R Core Team [ctb] (barplot , see copied.R)

Documentation:   PDF Manual  

GPL (>= 2) license

Imports graphics, grDevices, stats, utils, MASS

Suggests RColorBrewer, shiny, scagnostics, cluster, hdrcde, gplots, TSP, DendSer, testthat

See at CRAN