File: axis.break.Rd

package info (click to toggle)
r-cran-plotrix 2.9-3-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 960 kB
  • sloc: makefile: 3
file content (42 lines) | stat: -rw-r--r-- 1,537 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\name{axis.break}
\alias{axis.break}
\title{ Place a "break" mark on an axis }
\description{
 Places a "break" mark on an axis on an existing plot.
}
\usage{
 axis.break(axis=1,breakpos=NULL,bgcol="white",breakcol="black",
  style="slash",brw=0.02)
}
\arguments{
 \item{axis}{which axis to break}
 \item{breakpos}{where to place the break in user units}
 \item{bgcol}{the color of the plot background}
 \item{breakcol}{the color of the "break" marker}
 \item{style}{Either \samp{gap}, \samp{slash} or \samp{zigzag}}
 \item{brw}{break width relative to plot width}
}
\value{nil}
\note{
 There is some controversy about the propriety of using discontinuous
 coordinates for plotting, and thus axis breaks. Discontinuous coordinates
 allow widely separated groups of values or outliers to appear without
 devoting too much of the plot to empty space. The major objection seems 
 to be that the reader will be misled by assuming continuous coordinates.
 The \samp{gap} style that clearly separates the two sections of the plot
 is probably best for avoiding this.
}
\author{Jim Lemon and Ben Bolker}
\seealso{\link{gap.plot}}
\examples{
 plot(3:10,main="Axis break test")
 # put a break at the default axis and position
 axis.break()
 axis.break(2,2.9,style="zigzag")
 twogrp<-c(rnorm(10)+4,rnorm(10)+20)
 gap.plot(twogrp,gap=c(8,16),xlab="Index",ylab="Group values",
  main="Two separated groups with gap axis break",
  col=c(rep(2,10),rep(3,10)),ytics=c(3,5,18,20))
 legend(12,6,c("Low group","High group"),pch=1,col=2:3)
}
\keyword{misc}