shadowbox: adds a box with a shadow to a plot

Description Usage Arguments Details Author(s) Examples

Description

adds a box, with shadow on a plot; used for writing text

Usage

1
2
3
4
5
shadowbox(box.type = "rect", mid, radx, rady = radx, 
          shadow.size = 0.01, shadow.col = "grey",
          box.col = "white", lcol = "black", lwd = 1,  
          dr = 0.01, angle = 0, len = 1, nr = 5, rx = rady,
          theta = 90, ...)

Arguments

box.type

shape of the box.

mid

midpoint (x,y) of the box.

radx

horizontal radius of the box.

rady

vertical radius of the box.

shadow.size

relative size of shadow.

shadow.col

color of shadow.

box.col

fill color of the box.

lcol

line color surrounding box.

lwd

line width of line surrounding the box.

dr

if box is curved: size of segments, in radians, to draw ellipse (decrease for smoother).

angle

rotation angle, degrees.

len

if box.type="cylinder": length of the cylinder.

nr

if box.type="multi": the number of angles.

rx

if box.type="round", the radius of the rounded part.

theta

if box.type="parallel", angle of the bottom, left corner of the parallelogram, in degrees.

...

other arguments.

Details

one box is drawn, centered aroung point mid and with horizontal and vertical radiusses radx, rady.

By default, a shadow is drawn, in the right-lower corner of the box.

The shadow color and relative size is specified with shadow.col and shadow.size respectively.

shadow.size = 0 toggles off the drawing of the shadow.

the type of the box is set with box.type which can take on the values:

the fill-color of the box is specified with box.col;

the line width and color of the box are specified with lwd and lcol

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
openplotmat(main="shadowbox")

shadowbox(box.type = "rect", mid = c(0.1, 0.5),
          rady = 0.1, radx = 0.05, angle = 25)

shadowbox(box.type = "round", mid = c(0.3, 0.5),
          rady = 0.05, radx = 0.025, angle = 90,
          shadow.col = "darkred")

shadowbox(box.type = "ellipse", mid = c(0.5, 0.5),
          rady = 0.05, radx = 0.075, box.col = "blue")
          
shadowbox(box.type = "multi", mid = c(0.8, 0.5),
          rady = 0.05, radx = 0.05, box.col = "darkblue", nr = 5)

Example output

Loading required package: shape

diagram documentation built on Oct. 23, 2020, 5:46 p.m.