figOverplotDiagram {GCDkit}R Documentation

Overplotting data onto classification or geotectonic plots

Description

This function allows overplotting new data points onto single Figaro-compatible templates defined for classification or geotectonic plots (binary or ternary, designed as stand alone or extracted from plates).

Usage

figOverplotDiagram(overplot.dataset, bg.dataset=NULL, diagram=NULL,
    which=NULL, xlim=NULL, ylim=NULL, pch=NULL, col=NULL, 
    cex=NULL, labs=NULL, type="p", lwd=1, lty="solid", 
    transp=0, just.draw=TRUE, source.first = TRUE, source.plugins = FALSE, 
    source.diagrams = FALSE, ...)

Arguments

overplot.dataset

(obligatory) name of the main (foreground) dataset stored in memory, or global variable name.

bg.dataset

(optional) name of the background dataset stored in memory.

diagram

character; existing diagram name.

which

which plot is to be extracted (if belonging to a plate)?

xlim

new limits of the x axis.

ylim

new limits of the y axis.

pch

plotting symbol(s) for the foreground dataset.

col

plotting colour(s) for the foreground dataset.

cex

numeric; relative size of the plotting symbol(s) for the foreground dataset.

labs

text; optional labels for the overplotted data.

type

character; see 'points'.

lwd, lty

parameters for connecting line, if drawn; see 'par'.

transp

numeric; transparency for the background set, 0-1.

just.draw

logical; NOT FUNCTIONAL, kept just for compatibility sake.

source.first

logical; should be also the .First function sourced upon loading the new dataset?

source.plugins

logical; indicates whether all plugins should be sourced upon loading the new dataset.

source.diagrams

logical; indicates whether to build the lists of classification, geotectonic and user plots available for the overplot.dataset.

...

additional parameters to the underlying plotting function(s). See Details.

Details

The function 'figOverplotDiagram' can be employed in two ways.

If quoted names of two datasets in memory are provided ('bg.dataset' and 'overplot.dataset'), a new plot is created, whereby the background dataset is plotted using either the function 'plotDiagram' (for stand-alone plots) or 'plateExtract' (for one of diagrams extracted from a plate).

If only a single name of dataset is given, then the data are overplotted onto the current (preexisting) diagram.

Optional plotting parameters 'pch', 'col', 'cex', 'type', 'lwd' and 'lty' can be defined for the overplotted (foreground) dataset.

Argument '...' can supply additional parameters to the original plotting functions (e.g., 'TAS') invoked by 'plotDiagram' or 'plateExtract'.

Value

None.

Warning

This function serves to add extra components/annotations immediately before the graph (a spiderplot, simple binary or ternary plot) is printed or exported. Note that the points for the overplotted dataset are not part of the template, and thus will vanish upon redrawing, zooming ....

Author(s)

Vojtěch Janoušek, vojtech.janousek@geology.cz

See Also

figOverplot figAddReservoirs overplotDataset

underplotDataset plotDiagram plateExtract

figaro par

Examples

    data(sazava)
    accessVar("sazava")
    
    data(blatna) 
    accessVar("blatna")
    setCex(2)
    pokeDataset("blatna", overwrite.warn=FALSE)
    
    ## Two datasets
    # stand alone plot
    peekDataset("blatna")
    figOverplotDiagram("sazava","blatna","DebonBA",cex=2)
    
    figOverplotDiagram("sazava","blatna","DebonBA",pch=17,col="darkred",
        cex=2,transp=0.5,ylim=c(-400,200))

    # plateExtract
    figOverplotDiagram("sazava","blatna","PearceGranite",pch=17,col="darkred",
        cex=2,transp=0.5,which=2,xlim=c(5,100)) 

    ## Overplotting on existing plot - plotDiagram
    peekDataset("blatna")
    plotDiagram("DebonPQ",FALSE,TRUE)
    figCex(2)
    figRemove()
    figOverplotDiagram("sazava",pch=17,col="darkred",cex=2,transp=0.6)
    
    # Overplotting of existing plot - plateExtract
    peekDataset("blatna")
    plateExtract("PearceGranite",which=2)
    figXlim(c(1,100))
    figYlim(c(1,300))
    figCex(2)
    figOverplotDiagram("sazava",pch=17,col="darkred",cex=2,transp=0.6)

[Package GCDkit version 6.1 Index]