[R] clipart - box with rounded corners?

Spencer Graves spencer.graves at structuremonitoring.com
Mon May 12 06:49:51 CEST 2014


On 5/11/2014 8:29 PM, Jim Lemon wrote:
> On Sun, 11 May 2014 06:46:29 PM Spencer Graves wrote:
>>         Is there a function for creating a box with rounded corners?
>>
>>
>>         I can write one, but I thought I'd ask first.
>>
>>
> Hi Spencer,
> The tab.title function in plotrix has most of the code for this.

Hi, Jim:


       Thanks for this.  tab.title{plotrix} displays "the title of a 
plot as a colored tab".  It rounds the top two corners but does not 
allow the user to round the bottom two or draw a box around text 
anyplace else on the plot.


       I want a rectangle with rounded corners where I can control the 
location and size.  Sizing the box to text would be a bonus.


       boxed.labels{plotrix} is closer.  However, I'd want to add the 
following:   the


             * Some way of rounding the corners.  This might be like a 
parameter roundCorner being a number between 0 and 1, with 0 giving 
square corners and 1 providing a semicircle at the ends textround {diagram}


             * lwd and col parameters for the box:  My immediate 
application requires large red text in red box with rounded corners and 
a thick line.


        Other thoughts?


       Thanks again,
       Spencer Graves


p.s.  If you would like, I could modify "boxed.labels" as just discussed 
and email you the code.  Or I could "Request to join" the plotrix 
project on R-Forge and modify the help file as well as the code.

> Jim
>
>
>


-- 
Spencer Graves, PE, PhD
President and Chief Technology Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567
web:  www.structuremonitoring.com



More information about the R-help mailing list