« R's short learning curve | Main | Cluster Analysis 101 »

May 22, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a010534b1db25970b01156f82adb0970c

Listed below are links to weblogs that reference Make text stand out with outlines:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Eek! We'll be doing drop shadow and WordArt curvy things next!

If your graphics device supports transparency, I'd put the text on a transparent box, using strwidth and strheight to get the location where the text is going. Here's a start:

boxText <- function(x,y,string){
width=strwidth(string)
width=width+strwidth("m")
height=strheight(string)
height=height*2

rect(x-width/2,y-height/2,x+width/2,y+height/2,col="#77777766",border=NA)
text(x,y,string)

return(res)
}

Then do:

boxText(206,257, 'Caldera Rim')

Adjust colours and transparency levels to taste...

Barry

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Revolution Analytics
Information about Revolution R

Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
R Contest - Click to Enter

R links

Recommended Sites

Search Revolutions Blog