Note that there are some explanatory texts on larger screens.

plurals
  1. POR - change size of axis labels for corrplot
    text
    copied!<p>I am using the following with <code>corrplo</code>t:</p> <pre><code>require("corrplot") ## needs the corrplot package corrplot(cor(lpp_axis1, lpp_axis2), method=c("number"), bg = "grey10", addgrid.col = "gray50", tl.offset = 2, tl.cex=2, tl.col = "black", col = colorRampPalette(c("yellow","green","navyblue"))(100)) </code></pre> <p>This is created with a csv file available <a href="http://misterdavis.org/r_wiki/r_results_1231_2010" rel="nofollow noreferrer">here</a>.</p> <p>The graph is fine and I can adjust the cl labels all I want. I've tried adjusting the labels on x and y axis with no impact. I looked at changing mar - yet I haven't found a way to. I was unsuccessful with trying to use cex.label to change size.</p> <p>The question - how can I make the text appearing for corrplot (not the cl, and not in the grid) larger?</p> <p>The two axes are the following data frames:</p> <pre><code>lpp_axis1 &lt;- data.frame("Compile Source Code" = Q3A.1, "View Source Code" = Q3A.2, "Change Source Code" = Q3A.3, "Write Documentation" = Q3A.8, "File Bug Reports"= Q3B.3, "Ask Questions" = Q3B.5, "Provide Answers" = Q3B.6, "Overall Participation" = Q3a3bConsolidated) lpp_axis2 &lt;- data.frame("Identification" = Q1,"Overall Learning" = Q6Consolidated, "Learning Programming" = Q6.1, "Learning about Computers" = Q6.2, "Learning Teamwork" = Q6.3) </code></pre> <p>The output from</p> <pre><code>str(lpp_axis1) </code></pre> <p>is </p> <pre><code>&gt; str(lpp_axis1) 'data.frame': 4603 obs. of 8 variables: $ Compile.Source.Code : int 4 2 3 2 2 2 3 2 2 0 ... $ View.Source.Code : int 4 2 1 1 2 2 3 1 1 0 ... $ Change.Source.Code : int 4 1 0 1 2 1 2 1 1 0 ... $ Write.Documentation : int 4 1 2 2 3 0 3 0 1 0 ... $ File.Bug.Reports : int 4 4 1 2 2 0 2 0 0 0 ... $ Ask.Questions : int 4 4 2 4 2 1 2 1 3 0 ... $ Provide.Answers : int 2 4 1 4 4 0 3 1 3 0 ... $ Overall.Participation: int 49 26 14 32 31 8 27 10 15 0 ... </code></pre> <p>The output from </p> <pre><code>packageDescription("corrplot") </code></pre> <p>indicates:</p> <pre><code>Package: corrplot Type: Package Title: visualization of a correlation matrix Version: 0.30 Date: 2010-05-30 Author: Taiyun Wei Suggests: seriation, cairoDevice, Cairo, Maintainer: Taiyun Wei &lt;weitaiyun@gmail.com&gt; Description: The corrplot package is a graphical display of a correlation matrix, confidence interval. It also contains some algorithms to do matrix reordering. License: GPL-2 | GPL-3 LazyLoad: yes URL: http://corrplot.r-forge.r-project.org Repository: CRAN Repository/R-Forge/Project: corrplot Repository/R-Forge/Revision: 45 Date/Publication: 2010-05-31 07:44:14 Packaged: 2010-05-30 20:39:16 UTC; rforge Built: R 2.11.1; ; 2011-03-19 00:22:49 UTC; unix -- File: /home/user/R/x86_64-pc-linux-gnu-library/2.11/corrplot/Meta/package.rds &gt; </code></pre> <p>The corrplot maintainer wrote back with an alternate corrplot.r available <a href="http://misterdavis.org/R_info/corrplot.r" rel="nofollow noreferrer">here</a> </p> <p>Using the this corrplot and the example code below, the text size is acceptable. However, attempts to increase it also produce the same effects.</p> <pre><code>source("http://misterdavis.org/R_info/corrplot.r") corrplot(cor(lpp_axis1, lpp_axis2), addn=T, addgrid.col = "gray50", tl.cex=2, assign.col="min2max", tl.col = "black", cl.ratio=0.4, addcolor="no", col = colorRampPalette(c("yellow","green","blue"))(100)) </code></pre> <p>Using an earlier version of the correlation circles available <a href="http://addictedtor.free.fr/graphiques/sources/source_152.R" rel="nofollow noreferrer">here</a>, it is possible to adjust the text to one's heart desire. (Though the graph lacks some of the functionality of the later, more refined corrplot package.) cex can be used for cex. I may try to tweak the two to come up with a happy medium as time permits.</p> <p>Using the older correlation circles script, the following code produces sufficiently large X and Y axis labels:</p> <pre><code>circle.corr(cor(lpp_axis1, lpp_axis2), bg = "gray50", col = colorRampPalette(c("navyblue","white", "red"))(100), cex=1.5) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload