Dear list members:
Does anybody know how to add labels to the sets/circles of a "varpart"
diagram?
E.g., how to add labels to the three circles obtained with:
data(mite)
data(mite.env)
data(mite.pcnm)
mod <- varpart(mite, ~ SubsDens + WatrCont, ~ Substrate + Shrub + Topo,
mite.pcnm, data=mite.env, transfo="hel")
plot(mod)
mtext("Variation partitioning")
The standard "text" or "legend" functions used for plots do not work
presumably because it is a "varpart" object.
Thank you in advance!
Emili GARC?A-BERTHOU, Professor of Ecology
Institut d'Ecologia Aqu?tica & Dept. Ci?ncies Ambientals
Universitat de Girona, E-17071 GIRONA (Catalonia, Spain)
Tel.: +34 650 640 914 (dins UdG: 9221); Fax:? +34 972 418 150
Personal web page: http://invasiber.org/EGarcia/
labels to a varpart diagram
3 messages · Emili Garcia-Berthou, Ingolf Kuehn, Jari Oksanen
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20110408/2c02e73e/attachment.pl>
On 8/04/11 12:46 PM, "Ingolf Kuehn" <ingolf.kuehn at ufz.de> wrote:
Dear Emili, text works: the origin of the plot is in the centre upper left circle (X1 | X2+X3). Hence text(0, 0, "X1") would overwrite the "0.04". Similarly: see text(1, 0, "X2"), text(0.5, -.86, "X3") This might help you finding the correct coordinates.
Emili, You can use locator() function to find the coordinates. It is also possible to have locator() in the text() command. If you have plotted the varpart() result, you can do text(locator(), "My Title", cex=1.2) Then click the graph with the mouse button-1 (left) where you want to have your title, then do something that makes the locator() exit to show text "My Title". (This is a good opportunity to panic if you don't know yet how to exit locator(): you better check the documentation of ?locator before-hand to see how to behave in your operating system and graphical device. I clicked cmd-mouse in my one-button MacBook trackpad when the graph was in the X11 window, but the manual tells you to hit ESC in quartz graphics, and Windows may have something different.) I have considered adding circle labelling to vegan after seeing my mate using these labels, but I haven't done that yet (contributions are welcome and will be credited in the documentation). Cheers, Jari Oksanen