I'm using the package 'corrplot' for a figure to be used in an academic article. The figure must be black-and-white. I was able to produce a figure with some shades of grey (less than fifty, admitedly). However, the legend is still in red color. I need the legend be in black color. How can I get rid of the red color in the legend produced by'corrplot'? Thank you in advance, Antonello Preti Here some code for exemplification. ### call the library library(corrplot) library(RColorBrewer) ### toy dataset data(mtcars) ### assign the dataset to a vector dat <- mtcars ### corrplot with shades of grey corrplot.mixed(cor(dat), col = rev(brewer.pal(10, "Greys"))) title("\nCollinearity when r > 0.8") [[alternative HTML version deleted]]
On 19/02/2015 6:13 PM, Antonello Preti wrote:> I'm using the package 'corrplot' for a figure to be used in an academic> article. > The figure must be black-and-white. > I was able to produce a figure with some shades of grey (less than fifty, > admitedly). > However, the legend is still in red color. > I need the legend be in black color. > How can I get rid of the red color in the legend produced by'corrplot'?See the help page ?corrplot. It appears that the ... argument to corrplot.mixed can be any of the arguments to corrplot, and tl.col seems to default to red. Duncan Murdoch> > Thank you in advance, > Antonello Preti > > Here some code for exemplification. > > > ### call the library > > library(corrplot) > library(RColorBrewer) > > ### toy dataset > > data(mtcars) > > ### assign the dataset to a vector > > dat <- mtcars > > ### corrplot with shades of grey > > corrplot.mixed(cor(dat), col = rev(brewer.pal(10, "Greys"))) > title("\nCollinearity when r > 0.8") > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. >
On Feb 19, 2015, at 3:13 PM, Antonello Preti wrote:> I'm using the package 'corrplot' for a figure to be used in an academic > article. > The figure must be black-and-white. > I was able to produce a figure with some shades of grey (less than fifty, > admitedly). > However, the legend is still in red color. > I need the legend be in black color. > How can I get rid of the red color in the legend produced by'corrplot'? > > Thank you in advance, > Antonello Preti > > Here some code for exemplification. > > > ### call the library > > library(corrplot) > library(RColorBrewer) > > ### toy dataset > > data(mtcars) > > ### assign the dataset to a vector > > dat <- mtcars > > ### corrplot with shades of grey > > corrplot.mixed(cor(dat), col = rev(brewer.pal(10, "Greys")))`corrplot.mixed`'s help page says any extra arguments get passed to corrplot, so look at the help page for corrplot where teh tl.col parameter is described: corrplot.mixed(cor(dat), col = rev(brewer.pal(10, "Greys")), tl.col = "black")> title("\nCollinearity when r > 0.8") > > [[alternative HTML version deleted]]-- David Winsemius Alameda, CA, USA