Learn R Programming

measuRing (version 0.5.1)

plotSegments: Image segments

Description

One or several plots of consecutive segments of gray matrix and smoothed grays.

Usage

plotSegments(image, ratio = NULL, 
    marker = NULL, col.marker = "red", 
    tit = TRUE, plot = TRUE, 
    ...)

Value

the image segments and a list such as that produced by dataSegments.

Arguments

image

character or matrix. Either path of an image section or an array representing a gray matrix.

ratio

NULL or vector with two values representing the aspect of the plots (height, and width). If NULL the default aspect in par() is used.

marker

NULL or a number from 1 to 10 as explained in colNarrow. If numeric then three kind of markers are indicated: those narrow rings with averages major than marker, chronological markers (decades, centuries, and millenia), and the column numbers in gray matrix of the ring borders. The markers are highlighted with the color in col.marker. If NULL no markers are highlighted.

col.marker

color of the markers.

tit

logical or character. A title for the plots. If TRUE the main title is the image name. For more than 1 segment the main title ends with the segment number.

plot

logical. If TRUE the image segments are plotted.

...

arguments to be passed to four functions: dataSegments, ringWidths, ringBorders, and/or imageTogray.

Author

Wilson Lara <wilarhen@gmail.com> [aut, cre] (<https://orcid.org/0000-0003-3527-1380>), Carlos Sierra [aut] (<https://orcid.org/0000-0003-0009-4169>), Felipe Bravo [aut] (<https://orcid.org/0000-0001-7348-6695>)

Examples

Run this code
## (not run) Read one image sample in folder of package measuRing:
image1 <- system.file("P105_a.tif", package="measuRing")        
## column numbers to be included/avoided:
Toinc <- c(196,202,387,1564) 
Toexc <- c(21,130,197,207,1444,1484)        
##(not run) Plotting of five image segments:
plots <- plotSegments(image1,rgb=c(0.5,0,0.5),last.yr=2011,
    marker=8,segs=3,inclu = Toinc,exclu = Toexc)
## plots <- plotSegments(rwidths,segs = 4,marker=8)
## (not run) kill all the image segments:
graphics.off()
    

Run the code above in your browser using DataLab