Learn R Programming

StratigrapheR (version 0.0.2)

litholog: Creates a litholog

Description

Creates basic coordinates of polygons to draw a simple litholog with rectangles

Usage

litholog(l, r, h, i)

Arguments

l, r

the height of each delimitation (upper and lower; l and r stand for left and right boundaries of the interval, their order does not matter)

h

the hardness of each bed

i

the id of each bed

Value

A table of depth (dt) and xy value (i.e. hardness, or simply the x position if your litholog is vertical) of rectangles for each bed. Each bed is defined by an id (or name), which is the variable i in the table.

See Also

For a more detailed explanation of how to make a litholog: StratigrapheR

How to prepare the plot background for the litholog: whiteSet

How to draw the litholog: multigons

How to add the names of the beds in the litholog: bedtext

How to plot in pdf: pdfDisplay

To add personalised boundaries between beds: weldlog

To have open beds at the extremities of the log. More generaly to transform a polygon into a polyline and control the part that is not drawn: multilines and shift

To add details and drawings: centresvg and framesvg

Go further with interval data (between two boundaries, as there often is in stratigraphy): as.lim and related functions.

Complementary functions: infobar and ylink

Examples

Run this code
# NOT RUN {
l <- c(1,2,3)  # left boundary of the bed interval (upper or lower)
r <- c(0,1,2)  # right boundary of the bed interval (upper or lower)
h  <- c(4,3,4) # hardness (arbitrary)
i   <- c("B1","B2","B3") # Bed name

basic.litholog <- litholog(l,r,h,i) # Generate data frame of the polygons
                                    # making the litholog

whiteSet(xlim = c(0,4), ylim = c(0,3), ytick = 1, ny = 10) # Plot background
multigons(basic.litholog$i, basic.litholog$xy, basic.litholog$dt) # Draw log

# }

Run the code above in your browser using DataLab