I have an all numerical data frame in R
(no factors or levels) for which I'm trying to plot the correlation plot with the function chart.Correlation
from PerformanceAnalytics
library. Documentation here
The default colors are black and red. I want to be able to change the colors primarily and other attributes if possible.
The docs say that the function takes "any other passthru parameters into pairs." I do not understand this statement. I tried to pass some of the same parameters such as bg="lightblue"
but absolutely no change.
Any help would be very much appreciate it.
Update!
For what is worth - I was able to get some of the things wanted with another library which is built on top of pairs
. Here is the code:
library("psych")
pairs.panels(plot_data,
hist.col="#00FA9A",
show.points=TRUE,
stars=TRUE,
gap=0.05,
pch=".",
ellipses=FALSE,
scale=FALSE,
jiggle=TRUE,
factor=2,
main="Correlation",
col="#ADFF2F",
pty="m",
font=2)
I still do not know how to change the color of the data points - so there is your chance to get the points.
要更改pairs.panels 函数(心理)中数据点的颜色,请查看帮助菜单中的示例:
pairs.panels(iris[1:4],bg=c("red","yellow","blue")[iris$Species], pch=21+as.numeric(iris$Species),main="Fisher Iris data by Species",hist.col="red")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.