[R] Editing R graphics (fwd)

Agustin Lobo alobo at ija.csic.es
Mon Nov 26 11:04:45 CET 2001

Thanks to the many people who adviced me on this topic. 
xfig works very well, at least for what I have to do now.

I'd like to answer the message by Paul Marrell as well as
encourage others to do so:

On Fri, 23 Nov 2001, Paul Murrell wrote:

> I would be very interested to know the sorts of things you do to add things
> interactively to plots.
> As one reply mentioned, there is quite a lot of flexibility in R's graphics
> for placing additional text and graphical objects using functions like
> text(), rect(), lines(), polygon(), ...  This can even be done with a small
> interactive element using locator().  For example, ...
>     plot(1:10)
>     text(locator(1), "some annotation")
>     # now click on the graph where you want it to go
> However, there are things which are not possible (like selecting a piece of
> text on a graph and moving it with the mouse).
> Some of the work I am doing in the graphics at the moment, and in the new
> graphics package grid, will allow *some* more interactivity (or at least
> provide the possibility to develop it), so it would be great to know what
> sorts of things people really would like to be able to do.
> Any information gratefully received :)

Regarding myself, I try to get done as much I can 
writing my own R functions including the calls to some of the many
R graphic functions. Actually, I normally do it at 2 levels. First,
I try to write general (in the sense of my own work) functions. For
example, a personal CAIV.plot function or personal functions for
displaying results of discriminant analysis. Second, I use to write
an specific function for each figure that I want to include in a paper or
presentation. In that way it is (relatively) easy to include 
suggestions that come (usually several months later) from article

But despite the R ability to display informative graphics 
as the result of graphic functions, there is often the need to add 
more information to the graphic, information that often has not been
explicitely included in the analysis. We could call this to convert
the graphic into a figure. For example, we can get a correct
biplot of the PCA or Corresp. An. of an species x sites table from an R
function, but we can also add information to facilitate
the interpretation of the graphic: for some of the sites diplayed
in the biplot I include an small excerpt of the most abundant species
in that site, and/or highlight some critical species and include
a mention to relevant biological characteristics (ie., shade-tolerant,
evergreen etc.). Sometimes I also include another (reduced) figure, for
a reduced map indicating the geographic location of some sites, and or
time-series of the phenology as shown by satellite imagery. Another
example of adding ancillary information to an statistic graphic is
adding field-collected information to a graphic that displays results
from the analysis od remotely-sensed imagery.

Thanks, Paul, for you work at improving the (many) R graphic capabilities.


Dr. Agustin Lobo
Instituto de Ciencias de la Tierra (CSIC)
Lluis Sole Sabaris s/n
08028 Barcelona SPAIN
tel 34 93409 5410
fax 34 93411 0012
alobo at ija.csic.es

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list