Re: R-beta: legend

Jay King (jking@metisrv0.man-env.com)
Fri, 20 Feb 1998 13:07:16 +0000


From: "Jay King" <jking@metisrv0.man-env.com>
To: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
Date: Fri, 20 Feb 1998 13:07:16 +0000
Subject: Re: R-beta: legend
Message-Id: <18063080805089@man-env.com>

The problem was in the background color. I did not expect the plot 
to use a white background and the legend to use black. I would have 
assumed that the background color was the same for both and found 
nothing to the contrary in the documentation.

> To:            "Jay King" <jking@metisrv0.man-env.com>
> Cc:            r-help@stat.math.ethz.ch
> Subject:       Re: R-beta: legend
> From:          Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
> Date:          20 Feb 1998 17:57:47 +0100

> "Jay King" <jking@metisrv0.man-env.com> writes:
> 
> > 
> > Does the "legend" command work in the windows version of R? Here is 
> > the command that I'm using:
> > 
> > legend(1,1,legend=c("G1","G2","G3","G4","G5","G6"),pch=array(1:6,dim=c
> > (1,6)))
> > 
> > When I use this on my existing graph in a window I get a solid black 
> > box at the lower left. If I use this with the postscript driver my 
> > output file has neither a legend nor the black box.
> 
> You're not telling us what was on the plot in the first place, in
> particular not the x- and y-extents. I don't recall observing anything
> peculiar with the Windows version in that respect, but the plotting
> routines may have some idiosyncracies when you try to plot things that
> don't fit within the plotting frame.
> 
> First see if this works:
> 
> plot(1:6)
> legend(1,6,legend=c("G1","G2","G3","G4","G5","G6"),pch=1:6)
> 
> 
> -- 
>    O__  ---- Peter Dalgaard             Blegdamsvej 3  
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
> 
> 
---------------------------------------------------
Julius (Jay) King
Statistician
ManTech Environmental Technology, Inc.
2 Triangle Drive
Research Triangle Park, NC 27709
Phone: (919) 406-2199
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._