Skip to content

Commit

Permalink
Synonym PlotDonut
Browse files Browse the repository at this point in the history
  • Loading branch information
quicklizard99 committed Jul 5, 2016
1 parent 271c8ae commit 1a72442
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
3 changes: 3 additions & 0 deletions R/doughnut.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ PlotDoughnut <- function(values, clockwise=TRUE, origin.degrees=0,
breaks=breaks,
labels=labels.coords))
}

# North American spelling
PlotDonut <- PlotDoughnut
45 changes: 24 additions & 21 deletions man/PlotDoughnut.Rd
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
\name{PlotDoughnut}
\alias{PlotDoughnut}
\alias{PlotDonut}
\title{Plot doughnut}
\description{Plot values as a doughnut.}
\usage{
PlotDoughnut(values,
clockwise=TRUE,
origin.degrees=0,
radius=1,
thickness=0.5,
frame.plot=FALSE,
xlim=c(-radius, radius),
ylim=c(-radius, radius),
col=NULL,
n=2500,
centre.text=NULL,
centre.cex=par('cex'),
centre.col='black',
labels=names(values),
labels.cex=par('cex'),
labels.col='black',
labels.radius=radius-thickness/2,
to.degrees=360,
\dots)
PlotDoughnut(
values,
clockwise=TRUE,
origin.degrees=0,
radius=1,
thickness=0.5,
frame.plot=FALSE,
xlim=c(-radius, radius),
ylim=c(-radius, radius),
col=NULL,
n=2500,
centre.text=NULL,
centre.cex=par('cex'),
centre.col='black',
labels=names(values),
labels.cex=par('cex'),
labels.col='black',
labels.radius=radius-thickness/2,
to.degrees=360,
\dots)
}

\arguments{
Expand All @@ -48,7 +50,8 @@ PlotDoughnut(values,
\item{\dots}{other values to be passed to plotting functions.}
}
\details{Plots `values' in a doughnut.
\details{Plots `values' in a doughnut. `PlotDonut` is a synonym for
`PlotDoughnut`.
}

\author{Lawrence Hudson}
Expand All @@ -63,7 +66,7 @@ PlotDoughnut(v, centre.text=~Origin~at~90^o, origin.degrees=90)
PlotDoughnut(v, centre.text='Half nut', to.degrees=180, origin=-90)
PlotDoughnut(v, centre.text='Side nut', to.degrees=180, origin=0)
PlotDoughnut(v, centre.text='Taken a bite', to.degrees=270, origin=-45,
clockwise=FALSE)
clockwise=FALSE, thickness=0.1)
title(main='You doughnut', outer=TRUE, cex.main=3)
}
\keyword{hplot}

0 comments on commit 1a72442

Please sign in to comment.