> Bill Dunlap at StatSci pointed out the function AsciiToInt as a way to
> identify the numeric code for pch when desired to plot an ascii character
> via points or lines functions. Thank you, Bill.
>
> I have used this in my key statement within the Trellis function call as
>
> key=list(pch=c(AsciiToInt("A"),8,AsciiToInt("|")),col=c(2,5,3),text=c("Fir
> st line","Second line","Third line"))
>
> This produces a legend such as
>
> A First Line
> * Second line
> | Third line
>
> Regards,
>
> Jim Pratt
>
> -----Original Message-----
> From: Bill Dunlap [SMTP:bill@statsci.com]
> Sent: Friday, January 22, 1999 1:17 PM
> To: Pratt, James
> Subject: RE: [S]: mixing character and symbols in key ---solved
>
> On Fri, 22 Jan 1999, Pratt, James wrote:
>
> > Still, it would be nice if key() would accept a marks= vector so one
> need
> > not know the code for ASCII characters when one wished to mix the symbol
> > types in a legend, much like legend() did.
>
> Until then you can use AsciiToInt() to translate characters into their
> numeric codes so you don't have to remember them.
>
> > AsciiToInt("a")
> [1] 97
> > AsciiToInt(LETTERS[1:4])
> [1] 65 66 67 68
>
> --------------------------------------------------------------------------
> --
> Bill Dunlap 22461 Mt Vernon-Big Lake
> Rd
> Data Analysis Products Div. of MathSoft, Inc. Mount Vernon, WA 98274
> bill@statsci.com 360-428-8146
>
> "All statements in this message represent the opinions of the author and
> do
> not necessarily reflect MathSoft policy or position."
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|