File: plot-histPlot.Rd

package info (click to toggle)
fbasics 4052.98-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,020 kB
  • sloc: ansic: 738; makefile: 14
file content (140 lines) | stat: -rw-r--r-- 3,009 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
\name{HistogramPlot}
\alias{HistogramPlot}

\alias{histPlot}
\alias{densityPlot}
\alias{logDensityPlot}


\title{Histogram and density plots}

\description{

  Produce tailored histogram plots and kernel density/log-density
  estimate plots.
  
}

\usage{        
histPlot(x, labels = TRUE, col = "steelblue", fit = TRUE, 
    title = TRUE, grid = TRUE, rug = TRUE, skip = FALSE, \dots) 
densityPlot(x, labels = TRUE, col = "steelblue", fit = TRUE, hist = TRUE, 
    title = TRUE, grid = TRUE, rug = TRUE, skip = FALSE, \dots)    
logDensityPlot(x, labels = TRUE, col = "steelblue", robust = TRUE,  
    title = TRUE, grid = TRUE, rug = TRUE, skip = FALSE, \dots)    
}

\arguments{

  \item{x}{
    an object of class \code{"timeSeries"}.
  }
  \item{labels}{

    a logical flag, should the plot be returned with default labels
    and decorated in an automated way? By default \code{TRUE}.

  }   
  
  \item{col}{

    the color for the series. In the univariate case use just a color
    name like the default, \code{col = "steelblue"}, in the multivariate
    case we recommend to select the colors from a color palette,
    e.g. \code{col = heat.colors(ncol(x))}.

  }
  \item{fit}{
    a logical flag, should a fit be added to the plot?
  }
  \item{hist}{

    a logical flag, by default \code{TRUE}. Should a histogram be laid
    under the plot?

  }
  \item{title}{

    a logical flag, by default \code{TRUE}. Should a default title be
    added to the plot?

  }
  \item{grid}{

    a logical flag, should a grid be added to the plot?  By default
    \code{TRUE}.

  }
  \item{rug}{
    
    a logical flag, by default TRUE. Should a rug representation of the
    data be added to the plot?

  }
  \item{skip}{
    
    a logical flag, should zeros be skipped in the return Series?

  }
  \item{robust}{

    a logical flag, by default \code{TRUE}. Should a robust fit be added
    to the plot?

  }
  \item{\dots}{
    optional arguments to be passed on.
  }
    
}
\details{

  \code{histPlot} produces a tailored histogram plot.
  
  \code{densityPlot} produces a tailored kernel density estimate plot.
  
  \code{logDensityPlot} produces a tailored log kernel density estimate plot.
  
}
\value{
  \code{NULL}, invisibly. The functions are used for the side effect of
  producing a plot.
}

\seealso{
  \code{\link{seriesPlot}},
  \code{\link{returnPlot}},
  \code{\link{cumulatedPlot}},
  \code{\link{drawdownPlot}}

  \code{\link{qqnormPlot}},
  \code{\link{qqnigPlot}},
  \code{\link{qqghtPlot}},
  \code{\link{qqgldPlot}}

  \code{\link{boxPlot}},
  \code{\link{boxPercentilePlot}}

  \code{\link{acfPlot}},
  \code{\link{pacfPlot}},
  \code{\link{teffectPlot}},
  \code{\link{lacfPlot}}

  \code{\link{scalinglawPlot}}

  \code{\link{returnSeriesGUI}}
}

\examples{
## data
data(LPP2005REC, package = "timeSeries")
SPI <- LPP2005REC[, "SPI"]
plot(SPI, type = "l", col = "steelblue", main = "SP500")
abline(h = 0, col = "grey")
   
histPlot(SPI) 
   
densityPlot(SPI) 
}

\keyword{hplot}