[Xts-commits] r867 - in pkg/xts: . man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 30 04:36:30 CET 2014


Author: rossbennett34
Date: 2014-12-30 04:36:30 +0100 (Tue, 30 Dec 2014)
New Revision: 867

Added:
   pkg/xts/man/addLegend.Rd
   pkg/xts/man/addLines.Rd
   pkg/xts/man/addPoints.Rd
   pkg/xts/man/addSeries.Rd
Modified:
   pkg/xts/NAMESPACE
   pkg/xts/man/plot.xts.Rd
Log:
* moving man files from xtsExtra to xts for plot.xts and add* functions

* updating NAMESPACE with appropriate functions and methods for new version of plot.xts


Modified: pkg/xts/NAMESPACE
===================================================================
--- pkg/xts/NAMESPACE	2014-12-30 03:32:31 UTC (rev 866)
+++ pkg/xts/NAMESPACE	2014-12-30 03:36:30 UTC (rev 867)
@@ -120,11 +120,18 @@
 export(axTicksByTime)
 
 export(plot.xts)
-#export(lines.xts)
+export(addLegend)
+export(addLines)
+export(addPoints)
+export(addSeries)
 S3method(plot,xts)
-S3method(lines,xts)
-S3method(points,xts)
+S3method(print, replot_xts)
+S3method(plot, replot_xts)
 
+#export(lines.xts)
+#S3method(lines,xts)
+#S3method(points,xts)
+
 #export(Lag.xts, Next.xts) #, Diff.xts)
 
 export(lag.xts)

Added: pkg/xts/man/addLegend.Rd
===================================================================
--- pkg/xts/man/addLegend.Rd	                        (rev 0)
+++ pkg/xts/man/addLegend.Rd	2014-12-30 03:36:30 UTC (rev 867)
@@ -0,0 +1,30 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{addLegend}
+\alias{addLegend}
+\title{Add Legend}
+\usage{
+addLegend(legend.loc = "center", legend.names = NULL, col = NULL,
+  ncol = 1, ...)
+}
+\arguments{
+\item{legend.loc}{legend.loc places a legend into one of nine locations on
+the chart: bottomright, bottom, bottomleft, left, topleft, top, topright,
+right, or center.}
+
+\item{legend.names}{character vector of names for the legend. If \code{NULL},
+the column names of the current plot object are used.}
+
+\item{col}{fill colors for the legend. If \code{NULL},
+the colorset of the current plot object data is used.}
+
+\item{ncol}{number of columns for the legend}
+
+\item{\dots}{any other passthrough parameters. Not currently used.}
+}
+\description{
+Add Legend
+}
+\author{
+Ross Bennett
+}
+

Added: pkg/xts/man/addLines.Rd
===================================================================
--- pkg/xts/man/addLines.Rd	                        (rev 0)
+++ pkg/xts/man/addLines.Rd	2014-12-30 03:36:30 UTC (rev 867)
@@ -0,0 +1,40 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{addLines}
+\alias{addLines}
+\title{Add vertical lines to an existing xts plot}
+\usage{
+addLines(event.dates, event.labels = NULL, date.format = "\%Y-\%m-\%d",
+  main = "", on = NA, lty = 1, lwd = 1, col = 1, ...)
+}
+\arguments{
+\item{event.dates}{character vector of dates. Vertical lines will be drawn
+to indicate that an event happened during that time period.  \code{event.lines} should
+be a vector of dates (e.g., \code{c("09/03","05/06"))} formatted the same as
+\code{date.format}. This function matches the re-formatted row names (dates) with
+the events.list, so to get a match the formatting needs to be correct.}
+
+\item{event.labels}{character vector of event labels corresponding to
+\code{event.dates}. This will apply text labels (e.g.,
+\code{c("This Event", "That Event")} to the vertical lines drawn.}
+
+\item{date.format}{format for the dates in \code{event.lines}.}
+
+\item{main}{main title for a new panel if drawn.}
+
+\item{on}{panel number to draw on. A new panel will be drawn if \code{on=NA}.}
+
+\item{lty}{set the line type, same as in \code{\link{plot}}.}
+
+\item{lwd}{set the line width, same as in \code{\link{plot}}.}
+
+\item{col}{color palette to use, set by default to rational choices.}
+
+\item{\dots}{any other passthrough parameters. Not currently used.}
+}
+\description{
+Add vertical lines to an existing xts plot
+}
+\author{
+Ross Bennett
+}
+

Added: pkg/xts/man/addPoints.Rd
===================================================================
--- pkg/xts/man/addPoints.Rd	                        (rev 0)
+++ pkg/xts/man/addPoints.Rd	2014-12-30 03:36:30 UTC (rev 867)
@@ -0,0 +1,27 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{addPoints}
+\alias{addPoints}
+\title{Add time series of points to an existing xts plot}
+\usage{
+addPoints(x, main = "", on = NA, col = NULL, pch = 0, ...)
+}
+\arguments{
+\item{x}{an xts object to plot.}
+
+\item{main}{main title for a new panel if drawn.}
+
+\item{on}{panel number to draw on. A new panel will be drawn if \code{on=NA}.}
+
+\item{col}{color palette to use, set by default to rational choices.}
+
+\item{pch}{the type of plot to be drawn, same as in \code{\link{plot}}.}
+
+\item{\dots}{any other passthrough parameters. Not currently used.}
+}
+\description{
+Add time series of points to an existing xts plot
+}
+\author{
+Ross Bennett
+}
+

Added: pkg/xts/man/addSeries.Rd
===================================================================
--- pkg/xts/man/addSeries.Rd	                        (rev 0)
+++ pkg/xts/man/addSeries.Rd	2014-12-30 03:36:30 UTC (rev 867)
@@ -0,0 +1,34 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
+\name{addSeries}
+\alias{addSeries}
+\title{Add a time series to an existing xts plot}
+\usage{
+addSeries(x, main = "", on = NA, type = "l", col = NULL, lty = 1,
+  lwd = 1, pch = 0, ...)
+}
+\arguments{
+\item{x}{an xts object to plot.}
+
+\item{main}{main title for a new panel if drawn.}
+
+\item{on}{panel number to draw on. A new panel will be drawn if \code{on=NA}.}
+
+\item{type}{the type of plot to be drawn, same as in \code{\link{plot}}.}
+
+\item{col}{color palette to use, set by default to rational choices.}
+
+\item{lty}{set the line type, same as in \code{\link{plot}}.}
+
+\item{lwd}{set the line width, same as in \code{\link{plot}}.}
+
+\item{pch}{the type of plot to be drawn, same as in \code{\link{plot}}.}
+
+\item{\dots}{any other passthrough parameters. Not currently used.}
+}
+\description{
+Add a time series to an existing xts plot
+}
+\author{
+Ross Bennett
+}
+

Modified: pkg/xts/man/plot.xts.Rd
===================================================================
--- pkg/xts/man/plot.xts.Rd	2014-12-30 03:32:31 UTC (rev 866)
+++ pkg/xts/man/plot.xts.Rd	2014-12-30 03:36:30 UTC (rev 867)
@@ -1,51 +1,100 @@
+% Generated by roxygen2 (4.0.1): do not edit by hand
 \name{plot.xts}
 \alias{plot.xts}
-\title{ Plotting xts Objects }
-\description{
-Plotting methods for xts objects.
-}
+\title{Time series Plotting}
 \usage{
-\method{plot}{xts}(x, y = NULL,
-         type = "l", 
-         auto.grid = TRUE,
-         major.ticks = "auto",
-         minor.ticks = TRUE,
-         major.format = TRUE,
-         bar.col = "grey",
-         candle.col = "white",
-         ann = TRUE, axes = TRUE, ...)
+\method{plot}{xts}(x, y = NULL, ..., subset = "", FUN = NULL,
+  panels = NULL, multi.panel = FALSE, col = 1:12, up.col = "green",
+  dn.col = "red", type = "l", lty = 1, lwd = 2, lend = 1,
+  main = deparse(substitute(x)), clev = 0, cex = 0.6, cex.axis = 0.9,
+  mar = c(3, 2, 0, 2), srt = 0, xaxis.las = 0, ylim = NULL,
+  yaxis.same = TRUE, yaxis.left = TRUE, yaxis.right = TRUE,
+  grid.ticks.on = "months", grid.ticks.lwd = 1, grid.ticks.lty = 1,
+  grid.col = "darkgray", labels.col = "#333333", format.labels = TRUE,
+  shading = 1, bg.col = "#FFFFFF", grid2 = "#F5F5F5", legend.loc = NULL)
 }
 \arguments{
-  \item{x}{ an \code{xts} object }
-  \item{y}{ an \code{xts} object or NULL }
-  \item{type}{ type of plot to produce }
-  \item{auto.grid}{ should grid lines be drawn }
-  \item{major.ticks}{ should major tickmarks be drawn and labeled }
-  \item{minor.ticks}{ should minor tickmarks be drawn }
-  \item{major.format}{ passed along to axTicksByTime. See also }
-  \item{bar.col}{ the color of the bars when type is \sQuote{bars} or \sQuote{candles} }
-  \item{candle.col}{ the color of the candles when type is \sQuote{candles} }
-  \item{ann}{ passed \sQuote{par} graphical parameter }
-  \item{axes}{passed \sQuote{par} graphical parameter }
-  \item{\dots}{ additional graphical arguments }
-}
-\details{
-Mainly used to draw time-series plots with sensible x-axis labels, it
-can also plot basic OHLC series using \code{type='candles'} or \code{type='bars'}.
+\item{x}{xts object}
 
-Better financial plots can be found in the \pkg{quantmod} package, though
-these are generally incompatible with standard R graphics tools.
+\item{y}{NULL, not used}
+
+\item{\dots}{any passthrough parameters to FUN}
+
+\item{subset}{character vector of length one of the subset range using subsetting as in \code{\link{xts}}}
+
+\item{FUN}{function to apply to \code{x} and plot}
+
+\item{panels}{character vector of expressions to plot as panels}
+
+\item{multi.panel}{TRUE/FALSE or an integer less than or equal to the number
+of columns in the data set. If TRUE, each column of the data is plotted in a
+separate panel. For example, if \code{multi.panel = 2}, then the data
+will be plotted in groups of 2 columns and each group is plotted in a
+separate panel.}
+
+\item{col}{color palette to use, set by default to rational choices}
+
+\item{up.col}{color for positive bars if \code{type="h"}}
+
+\item{dn.col}{color for positive bars if \code{type="h"}}
+
+\item{type}{the type of plot to be drawn, same as in \code{\link{plot}}}
+
+\item{lty}{set the line type, same as in plot}
+
+\item{lwd}{set the line width, same as in plot}
+
+\item{lend}{set the line end style, same as in plot}
+
+\item{main}{main title}
+
+\item{clev}{level for shading, not currently used}
+
+\item{cex}{not currently used}
+
+\item{cex.axis}{cex of the axis}
+
+\item{mar}{set the margins, same as in par}
+
+\item{srt}{rotation for the y axis labels}
+
+\item{xaxis.las}{rotation for the x axis labels}
+
+\item{ylim}{the range of the y axis}
+
+\item{yaxis.same}{TRUE/FALSE. If TRUE, the y axis is drawn with the same ylim for multiple panels}
+
+\item{yaxis.left}{if TRUE, draws the y axis on the left}
+
+\item{yaxis.right}{if TRUE, draws the y axis on the right}
+
+\item{grid.ticks.on}{period to draw the grid ticks on}
+
+\item{grid.ticks.lwd}{line width of the grid}
+
+\item{grid.ticks.lty}{line type of the grid}
+
+\item{grid.col}{color of the grid}
+
+\item{labels.col}{color of the axis labels}
+
+\item{format.labels}{not currently used}
+
+\item{shading}{not currently used}
+
+\item{bg.col}{not currently used}
+
+\item{grid2}{color for secondary x axis grid}
+
+\item{legend.loc}{places a legend into one of nine locations on the chart:
+bottomright, bottom, bottomleft, left, topleft, top, topright, right, or
+center. Default NULL does not draw a legend.}
 }
-\value{
-Plots an xts object to the current device.
+\description{
+Plotting for xts objects.
+TODO: description, details, and examples
 }
-\author{ Jeffrey A. Ryan }
-\examples{
-data(sample_matrix)
-plot(sample_matrix)
-plot(as.xts(sample_matrix))
-plot(as.xts(sample_matrix), type='candles')
+\author{
+Ross Bennett
 }
-% Add one or more standard keywords, see file 'KEYWORDS' in the
-% R documentation directory.
-\keyword{ hplot }
+



More information about the Xts-commits mailing list