Creates and checks basic coordinates of polygons to draw a simple litholog with rectangles
litholog(l, r, h, i)is.litholog(object)
A table of ids (i), depth (dt) and xy value (i.e. hardness, or simply the x position if your litholog is vertical) of rectangles for each bed. This order of column variable (i, dt, xy) is checked by is.litholog
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)
the hardness of each bed
the id of each bed: it should be different for each bed
an R object to test whether it is a litholog, as outputted by
the litholog
function
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
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
is.litholog(basic.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