[R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Dear R help I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? The code I used is: fa.diagram(fa.11factors.rawdata) # Start PDF device driver to save output to fa_diagram.pdf pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf, height=10, width=5) fa.diagram(fa.11factors.rawdata) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf, height=8, width=5) fa.diagram(fa.11factors.rawdata,cex=0.8) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) Thank you so much for your time Yours sincerely Brent Caldwell fa_diagram_cex.pdf Description: fa_diagram_cex.pdf fa_diagram.pdf Description: fa_diagram.pdf __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Dear Bill Wow! Thank you so much for your rapid reply - you are such a kind person, thank you! I'll try fa.rgraph - thanks Thanks Best wishes Brent -Original Message- From: William R Revelle [mailto:reve...@northwestern.edu] Sent: Tuesday, 27 November 2012 5:54 p.m. To: Brent Caldwell Cc: r-help@R-project.org Subject: Re: [R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other Brent, No, cex doesn't work (as you have discovered). That is a bug. I will work on it. In the meantime, try Rgraphviz called from fa.rgaph or use the output from fa.graph which produces a dot file for processing with any graphic package (including graphviz) which handles the dot language. Bill On Nov 26, 2012, at 10:08 PM, Brent Caldwell brent.caldw...@otago.ac.nz wrote: Dear R help I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? The code I used is: fa.diagram(fa.11factors.rawdata) # Start PDF device driver to save output to fa_diagram.pdf pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf, height=10, width=5) fa.diagram(fa.11factors.rawdata) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf, height=8, width=5) fa.diagram(fa.11factors.rawdata,cex=0.8) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) Thank you so much for your time Yours sincerely Brent Caldwell fa_diagram_cex.pdffa_diagram.pdf__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. William Revellehttp://personality-project.org/revelle.html Professor http://personality-project.org Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern Universityhttp://www.northwestern.edu/ Use R for psychology http://personality-project.org/r It is 5 minutes to midnighthttp://www.thebulletin.org __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Brent, No, cex doesn't work (as you have discovered). That is a bug. I will work on it. In the meantime, try Rgraphviz called from fa.rgaph or use the output from fa.graph which produces a dot file for processing with any graphic package (including graphviz) which handles the dot language. Bill On Nov 26, 2012, at 10:08 PM, Brent Caldwell brent.caldw...@otago.ac.nz wrote: Dear R help I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? The code I used is: fa.diagram(fa.11factors.rawdata) # Start PDF device driver to save output to fa_diagram.pdf pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf, height=10, width=5) fa.diagram(fa.11factors.rawdata) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf, height=8, width=5) fa.diagram(fa.11factors.rawdata,cex=0.8) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) Thank you so much for your time Yours sincerely Brent Caldwell fa_diagram_cex.pdffa_diagram.pdf__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. William Revellehttp://personality-project.org/revelle.html Professor http://personality-project.org Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern Universityhttp://www.northwestern.edu/ Use R for psychology http://personality-project.org/r It is 5 minutes to midnighthttp://www.thebulletin.org __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Psych package: fa.diagram, how to re-arrange layout so numbers do not over-write each other
Brent, Try setting the cex parameter to make the numbers smaller. Also try modifying the e.size (ellipse size) parameter. Then, to make much better looking graphs, see if you can install Rgraphviz and try using the fa.rgraph function or use the graphviz=TRUE parameter. fa.diagram was a hack to get around the problem that graphviz was very hard to install and sometimes would not even be possible to use. The preferred function (if you have Rgraphviz) is fa.rgraph. Bill On Nov 26, 2012, at 10:08 PM, Brent Caldwell brent.caldw...@otago.ac.nz wrote: Dear R help I have conducted a fa() analysis, and I want to use fa.diagram to assess the extent to which the 11 latent factors predict the 37 items in a psychological battery. However, the display on the screen has very large font size for the coefficients of the relationship between the 11 factors and the 37 items, so the numbers overlap and are therefore illegible. When I output this to a pdf the problem is exacerbated even further (see attachments). I tried to use cex=0.8 and cex=0.4 in the pdf argument but it made no difference - what can I do? The code I used is: fa.diagram(fa.11factors.rawdata) # Start PDF device driver to save output to fa_diagram.pdf pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram.pdf, height=10, width=5) fa.diagram(fa.11factors.rawdata) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) pdf(file=I:\\ZAPi\\Tables-of-R-output\\fa_diagram_cex.pdf, height=8, width=5) fa.diagram(fa.11factors.rawdata,cex=0.8) #box() # Create box around plot dev.off() # Turn off device driver (to flush output to PDF) Thank you so much for your time Yours sincerely Brent Caldwell fa_diagram_cex.pdffa_diagram.pdf__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. William Revellehttp://personality-project.org/revelle.html Professor http://personality-project.org Department of Psychology http://www.wcas.northwestern.edu/psych/ Northwestern Universityhttp://www.northwestern.edu/ Use R for psychology http://personality-project.org/r It is 5 minutes to midnighthttp://www.thebulletin.org __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.