[R] Symbols for male/female

Martin Maechler maechler at stat.math.ethz.ch
Thu Oct 31 10:57:48 CET 2002


>>>>> "Lorenz" == Lorenz Gygax <gygax at ifi.unizh.ch>
>>>>>     on 31 Oct 2002 08:10:25 +0100 writes:

    Lorenz> Dear all,

    Lorenz> I would like to use the biological symbols for male
    Lorenz> and female as plotting symbols in a scatterplot
    Lorenz> (ideally filled and non-filled). R does not seem to
    Lorenz> have these symbols using pch= in plot() nor are they
    Lorenz> implemented via expression() or at least I did not
    Lorenz> find them. I found that the symbols are
    Lorenz> e.g. available in the wasysym and the marvosym
    Lorenz> package in LaTeX.

    Lorenz> I have coded two very rough functions that are able
    Lorenz> to approximate those symbols, but not surprisingly,
    Lorenz> they are not very efficient regarding the file size
    Lorenz> they produce (I have included the code for the
    Lorenz> female symbol at the end of the mail).

    Lorenz> Is there a more or less straightforward way to
    Lorenz> implement these symbols so that they can be accessed
    Lorenz> either by pch= or expression()? Can you give me some
    Lorenz> pointers on how I would need to go about this?

I've just replied to this in some length on R-devel rather than
R-help since my answer really is about future development of R,
here.

The short answer:  
It is not straightforward but doable in principle by hacking in
the R source, learning some of the internal graphics system
(done in C).   Please use R-devel at .. for further discussion.

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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