[R] clipart - box with rounded corners?

Spencer Graves spencer.graves at structuremonitoring.com
Mon May 12 08:17:57 CEST 2014


On 5/11/2014 8:53 PM, Paul Murrell wrote:
> Hi
>
> There is a grid.roundrect(), in case you are working in that
> alternative universe.

p.s.  Is it feasible to mix grid with traditional graphics?  Your Ch. 6 
begins, "This chapter is useful for drawing ... from scratch, and for 
adding output to plots created by lattice and ggplot2."  However, I 
understand that grid produces graphics object or grobs, which are 
"printed" to be viewed.  Thanks.  Spencer


###############


Hi, Paul:


       Is there an easy way to specify the roundrect arguments in 
standard user coordinates?  "plot(7:8); grid.roundrect(.6, .4, .4, .2, 
name='rr')" gave me a rectangle occupying roughly 50% of the horizontal 
space and 30% of the vertical space in the plot region [not 40% and 20% 
as I might naively expect], centered at roughly (1.6, 7.4).


       I found grid.roundrect mentioned on p. 179 of the second edition 
of our "R Graphics".  I'll try reading that first part of your chapter 6 
to see if that produces sufficient enlightenment.  I failed to achieve 
sufficient understanding of grid from your first edition.


       Thanks,
       Spencer

>
> Paul
>
> On 05/12/14 13:46, 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.
>>
>>
>>        Thanks,
>>        Spencer Graves
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list