tierChart(x,
startMonth = latestJanuary(end(x)),
nMonths = 4,
nYears = 7,
offsets = 0,
padDays = 6,
pch = "year",
lty = "solid",
lwd = 1.5,
col = 1 + (n.y:1),
type = "b",
ylim = NULL,
outlier.trim = 0,
noTrimLastYear = TRUE,
extendHorizontalTicks = TRUE,
circles.ymd = NULL,
circles.col = 6,
circles.inches = 0.1,
vlines.ymd = NULL,
vlines.col = 2,
vlines.lty = 4,
vlines.lwd = 1.5,
vlines2.ymd = NULL,
vlines2.col = 3,
vlines2.lty = "solid",
vlines2.lwd = 2,
hlines = NULL,
hlines.col = 1,
hlines.lty = 1,
hlines.lwd = 1,
tiPoints.1 = NULL,
tiPoints.2 = NULL,
pch.1 = "*",
pch.2 = "+",
col.1 = 2,
col.2 = 3,
nolegend = FALSE,
main = deparse(substitute(x)),
topleft.labels = NULL,
topright.labels = NULL,
legend.ncol = length(years),
legend.bg = 0,
timestamp = TRUE,
topline = TRUE,
vlines.periodEnd = TRUE,
vlines.month = TRUE,
midperiod = FALSE,
lwdLastYear = 1.5,
cex = 1.5,
boxes = TRUE,
...)adjustableTierChart(x,
...,
edit = TRUE,
changes = numeric(0),
verbose = FALSE)
tis
object) or something that as.tis
can
convert to one.ti
) object indicating first month to
show on plot.offsets[2]
is 3, for example, the points for the
second-to-last year will be shifted forward 3 days on the plot.
Negative numbers shift points back.
If length(off
"p"
, points; "l"
, lines; "b"
, both;
"n"
, none; or "h"
, high-density) should be done for
each year. The first character of typ
pretty(ylim)
.
If ylim
is not set explicitly, the value of
outlier.trim
is used to calculateylim
aboveTRUE
(the default), outlier.trim
is effectively
set to zero for the most recent year, i.e., the y-axis limits will
be expanded, if necessary, to insure that all of the points plotted
for the most recent year fit on the pTRUE
(the default), extend the horizontal ticks with a
dotted line all the way across the chart.circles.col
and circles.inches
.circles.ymd
above.circles.ymd
above.vlines.lty
width vlines.lwd
and colors
vlines.col
at the dates given.vlines.ymd
abovevlines.ymd
abovevlines.ymd
abovevlines2.lty
width vlines2.lwd
and colors
vlines2.col
at the dates given.vlines2.ymd
abovevlines2.ymd
abovevlines2.ymd
abovehlines.lty
width
hlines.lwd
and colors hlines.col
at the locations given.hlines
abovehlines
abovehlines
aboveti
object specifying dates for which the corresponding
points will be marked with the characters in pch.1
in
colors col.1
.tiPoints.1
abovetiPoints.1
aboveti
object specifying dates for which the corresponding
points will be marked with the characters in pch.2
in
colors col.2
.tiPoints.2
abovetiPoints.2
aboveT
do not plot a legendnolegend
is T
.T
put a timestamp in upper right corner of top marginT
(the default) draw an axis line across the top of the plotT
(the default) draw a light vertical line at each period end of
the most recent year plotted.T
(the default) draw a light vertical line at month boundariesT
draw the point for each period on the middle day of the
period. If F
(the default) draw points on the last day of
the period.T
(the default) add scroll arrow and PrintMe boxes to the
plot for use by adjustableTierChart
.adjustableTierChart
, arguments to be passed on to
tierChart
. For tierChart
, ...denote arguments to
be passed to matplot
, which does the actual plotting.T
, the points on the plot are editable. Clicking above or
below a point draws an arrow from the point to it desired new
location.T
, adjustableTierChart
is chattier about what it is
doing.tierChart
invisibly returns a list with the following components:nYears
columns containing the x coordinates of
the points for each year.nYears
columns containing the y coordinates of
the points for each year.px
F
, the lBox
,
rBox
and printBox
elements of the list will not be
present.
adjustableTierChart
returns the edited input series x
as
a tis
object, with an additional startMonth
attribute.
adjustableTierChart
is preferred to
tierChart
, since the former presents a chart that can be
edited, scrolled and printed via mouse clicks, while the latter simply
draws a single chart and returns. However, adjustableTierChart
requires user interaction, which may make it unsuitable for some uses. When adjustableTierChart
is called, it draws on the current
graphics device and then waits for mouse clicks to occur. A left mouse
button click on one of the scroll arrows changes the display to show
adjacent months, while a left mouse click on the PrintMe box
causes the current plot to be copied to the printer. Left mouse clicks
in the data area of the plot are used to edit the values of the time
series. Arrows are drawn from the current data points to the mouse
location to show where the new data values will be.
A middle mouse button click causes adjustableTierChart
to
return. Closing the graphics window via the windowing system (e.g.,
clicking on the window's X button) has the same effect.
Until adjustableTierChart
is told to return, the entire R
process will appear to be frozen. It isn't actually frozen, it's just
waiting for mouse input. Use tierChart
instead if no user
interaction is desired.
monthplot
for a nice way to look at seaonality in monthly
data.tierChart(m1.w) ## January - April of 7 most recent years
tierChart(m1.w, startMonth=1, nMonths = 12) ## Tier chart for entire year
tierChart(m1.w, type="l", lty=1) ## same as first example, but with
## solid lines and no plotting symbols
xe <- adjustableTierChart(x) ## xe will be edited version of x
Run the code above in your browser using DataLab