Graphics Reference
In-Depth Information
Table 13-1. Options for corrplot()
Option
Description
type={"lower" | "upper"}
Only use the lower or upper triangle
Don't show values on the diagonal
diag=FALSE
Add lines indicating the direction of the correlation
addshade="all"
Hide correlation direction lines
shade.col=NA
Use colored squares
method="shade"
Use ellipses
method="ellipse"
Add correlation coefficients, in color
addCoef.col=" color "
Specify the rotation angle for top labels
tl.srt=" number "
Specify the label color
tl.col=" color "
order={"AOE" | "FPC" |
"hclust"}
Sort labels using angular order of eigenvectors, first principle component, or hier-
archical clustering
See Also
To create a scatter plot matrix, see Making a Scatter Plot Matrix .
For more on subsetting data, see Getting a Subset of a Data Frame .
Plotting a Function
Problem
You want to plot a function.
Solution
Use stat_function() . It's also necessary to give ggplot() a dummy data frame so that it will
get the proper xrange. In this example we'll use dnorm() , which gives the density of the normal
distribution ( Figure 13-4 , left):
# The data frame is only used for setting the range
p <- ggplot(data.frame(x = c( -3 , 3 )), aes(x = x))
Search WWH ::




Custom Search