Re: [R] triangular plot
Also triplot in TeachingDemos -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of David Carlson Sent: Friday, June 12, 2009 8:13 AM To: r-help@r-project.org Subject: Re: [R] triangular plot You may have more luck with the triangle plot functions available in other R libraries. In addition to triangle.plot in ade4, you have other options (this may not be an exhaustive list): plot.acomp in compositions tri in cwhmisc.cwhtool triax in plotrix ternary in StatDA ternaryplot in vcd ternaryplot in Zelig David L. Carlson Anthropology Department Texas AM University College Station, TX 77843-4352 __ 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. __ 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] triangular plot
You may have more luck with the triangle plot functions available in other R libraries. In addition to triangle.plot in ade4, you have other options (this may not be an exhaustive list): plot.acomp in compositions tri in cwhmisc.cwhtool triax in plotrix ternary in StatDA ternaryplot in vcd ternaryplot in Zelig David L. Carlson Anthropology Department Texas AM University College Station, TX 77843-4352 __ 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] triangular plot
On Jun 12, 2009, at 10:13 AM, David Carlson wrote: You may have more luck with the triangle plot functions available in other R libraries. In addition to triangle.plot in ade4, you have other options (this may not be an exhaustive list): plot.acomp in compositions tri in cwhmisc.cwhtool triax in plotrix Your posting was especially helpful because it is not reproducible with the combination of resutls from ??triangle amd ??ternary. But in plotrix the function is triax.plot ternary in StatDA ternaryplot in vcd Very nice looking plot if you add labels with the id= parameter. In the help page example using , id=rownames(tab), was what worked for me. ternaryplot in Zelig David L. Carlson Anthropology Department Texas AM University College Station, TX 77843-4352 David Winsemius, MD Heritage Laboratories West Hartford, CT __ 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.
[R] triangular plot
Sorry for probably again an easy question but I can not find the solution... Using the ade4 package I am drawing a triangular graph: triangle.plot(data2, label = row.names(data2), clab=0.6, show.position=FALSE, box=FALSE) Which is what I want. Unfortunately the labels have a frame and a white background. I would like to have them without frame and colour, similar to what you get with type=text. I tried various things (box, boxes, label.color and settings of par via fg or bg=transparent) without luck. Any help is highly appreciated. Thanks a lot in advance With kind regards Johannes -- Project Coordinator BIOTA West Amphibians Museum of Natural History Dep. of Research (Herpetology) Invalidenstrasse 43 D-10115 Berlin Tel: +49 (0)30 2093 8708 Fax: +49 (0)30 2093 8565 http://www.biota-africa.org http://community-ecology.biozentrum.uni-wuerzburg.de __ 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] triangular plot
On Jun 11, 2009, at 8:56 AM, Penner, Johannes wrote: Sorry for probably again an easy question but I can not find the solution... Using the ade4 package I am drawing a triangular graph: triangle.plot(data2, label = row.names(data2), clab=0.6, show.position=FALSE, box=FALSE) Which is what I want. Unfortunately the labels have a frame and a white background. I would like to have them without frame and colour, similar to what you get with type=text. I tried various things (box, boxes, label.color and settings of par via fg or bg=transparent) without luck. Any help is highly appreciated. Thanks a lot in advance triangle.plot does not have optional parameters to be passed to accessory functions. Furthermore, it calls scatterutil.eti for the plotting of boxes which has hard-coded white background in the boxes. As far as I can tell triangle.plot does not pass a color argument for the borders of the boxes. scatterutil.eti function (x, y, label, clabel, boxes = TRUE, coul = rep(1, length(x)), horizontal = TRUE) snipped code if (boxes) { rect(x1 - xh/2, y1 - yh/2, x1 + xh/2, y1 + yh/2, col = white, border = coul[i]) snipped code scatterutil.eti2 function (x, y, label, clabel, boxes = TRUE, coul = rep(1, length(x)), horizontal = TRUE) snipped code if (boxes) { rect(x1 - xh/2, y1 - yh/2, x1 + xh/2, y1 + yh/2, col = transparent, border = coul[i]) snipped code I made up a triangle.plot2 and a scatterutil.eti2 with col=transparent and provision for passing color parameters to the borders of the boxes and a got part of the way toward what you are asking requesting. There is a remaining glitch when I use the first example in the triangle.plot help page. A minority of items still get boxes even though they are transparent. Probably has to do with the default assignment of coul[i] to border. That could certainly be altered as well. I could not tell exactly what you mean by have them without frame and colour either because of your use of the indefinite English pronoun or the use of Aristotelean logic. They (the boxes anyway) currently have no color. Did you want color added to something? At any rate you can do the same sort of function hacking as I did. There are no methods or other complicating issues in your way. All the source is at the surface. -- David Winsemius, MD Heritage Laboratories West Hartford, CT __ 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.