Plate {GCDkit}R Documentation

Plotting plates of several diagrams

Description

Functions to set up, save or load a so-called 'plate', i.e. a regular grid of slots to accommodate (any mixture of) binary or ternary plots, spiderplots or such alike. For instance, Harker plots are implemented using the plate concept.

Usage

    multiplePerPage(which=NULL,nrow=NULL,ncol=NULL,title="Plate",
    dummy=TRUE)
    
    Plate(scr=NULL) 
    
    plateRedraw(device="windows",filename=NULL,colormodel="rgb")
    
    platePS(colormodel="rgb")
    
    plateSave()
    
    plateLoad()  

Arguments

which

total number of slots to be occupied by individual diagrams.

nrow

number of rows in the plots' matrix.

ncol

number of columns in the plots' matrix.

title

title for the whole plate.

dummy

logical; if TRUE, dummy plots are shown. See Details.

scr

(optional) number of screen to be selected.

device

output device; either 'windows' or 'postscript'.

filename

name of file if output redirected to Postscript.

colormodel

color mode for Postscript; 'rgb' or 'gray'.

Details

The function 'multiplePerPage' serves to setting up a matrix of slots, each of which could be taken by a single Figaro-compatible diagram (a binary plot, a ternary plot, a spiderplot,...). If 'which' is NULL, the function asks for their number, and then suggests number of rows ('nrow') and columns ('ncol') for the matrix arrangement.

If desired, the slots can be filled by the so-called 'dummy plots', i.e. gray boxes showing the exact position and the size of each of them.

If 'which' is an integer, specified number of slots is allocated. Alternatively, this argument may represent a vector containing any mixture of names of diagrams that can be plotted by the function plotDiagram or even plotting commands themselves used to fill the individual slots directly. See Examples.

Once set up, a single slot can be selected for further work using the function 'Plate'. The function can be called directly, with the number of the screen desired. If none is specified, a red box-like cursor appears in the graphical window, which can be moved around using the cursor keys, Spacebar or by mouse. The appropriate slot can be chosen by left mouse button or by pressing Enter. Right-click anywhere on the plate invokes a context menu which enables several actions:

Menu item Function
Introduce plot Select a new Figaro-compatible diagram for this slot.
Plot editing Modify the existing diagram (similarly to the menu Plot editing for stand alone plots).
Plate editing Functions to modify the overall plate properties or all its diagrams simultaneously.

The function 'plateRedraw' serves for replotting a 'clean! version of the whole plate, eg. for saving/printing, For this purpose, its output can be redirected to Postscript, either in colour or as black and white. As a wrapper for the Postscript output serves the function 'platePS'

The functions 'plateSave' and 'plateLoad' are designed to save and retrieve definitions of plates (Figaro sheets and the relevant data) for later use. The default suffix for the saved plates is 'mgr'. Note that only the data needed for the plotting ('x.data', 'y.data') are stored in the 'mgr' files. Thus the data set currently in memory (e.g., variables 'WR', 'labels', ...) is unaffected by the function 'plateLoad'.

Starting with GCDkit version 3, the plates concept is used by some built-in functions, such as 'Multiple plots' (function multiple) or 'Multiple plots by groups' (function figMulti).

Value

plate

list of Figaro definitions for individual diagrams

plate.data

list containing 'x.data' and 'y.data' for each of them

Author(s)

Vojtech Janousek, vojtech.janousek@geology.cz

See Also

Plate editing, plotPlate, multiple, figMulti, plot, binary, ternary, spider, figaro, figLoad, figSave

Examples

    data<-loadData("sazava.data",sep="\t")
    multiplePerPage(which=c("binary(\"K2O/Na2O\",
        \"Rb\",new=FALSE)",
        "DebonPQ","AFM","PeceTaylor","Shand"))
    
    Plate()
    
    Plate(3)
    plotDiagram("LarochePlut",FALSE,FALSE)

[Package GCDkit version 4.0 Index]