assignSymbLab {GCDkit}R Documentation

Symbols by label

Description

Assigns plotting symbols according to the levels of the chosen label or, alternatively, sample names.

Usage

assignSymbLab(lab = NULL, symbols = NULL, display.legend = FALSE)

Arguments

lab

specification of the variable to be used for symbols assignment. See Details.

symbols

a vector with codes of plotting symbols to be assigned. Batch mode only.

display.legend

logical; should be the legend displayed? Batch mode only.

Details

If called from in interactive mode (from GUI), the variable (sample names or label) can be selected using the function 'selectColumnLabel'.

In batch mode, 'lab' can be an integer (1 for sample names, or a sequence number of the column in the 'labels' plus 1). Alternatively, it can contain the full name of a column in 'labels'. See examples.

If in batch mode, 'symbols' have to be specified for the correct plotting symbols assignment.

Value

Sets 'leg.pch' to a sequence number of column in 'labels' that is to be used to build the legend or -1 if sample numbers are to be used; 'labels$Symbol' contains the codes for desired plotting symbols.

Author(s)

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

See Also

To display the current legend use showLegend.

Using the function assignSymbLett, initial letters of the respective levels of the chosen label can be assigned to the plotting symbols.

Colours by a single label can be assigned by assignColLab, symbols and colours by groups simultaneously by assignSymbGroup. Uniform colours and symbols are obtained by assign1symb and assign1col. Table of available plotting symbols is displayed by showSymbols and colours by showColours.

Selecting a label: selectColumnLabel.

Examples

    data(sazava)
    accessVar("sazava")
    
    ## Not run: assignSymbLab()              # Interactive mode
    
    # Sample names, standard GCDkit colours palette 
    assignSymbLab(1,symbols=1:nrow(WR),display.legend=TRUE)             # By samples             
    
    assignSymbLab(2,symbols=c("+","*","@"),display.legend=TRUE)         # First column in labels
    
    assignSymbLab("Intrusion",symbols=c(12,15,17),display.legend=TRUE)  # Ditto (here Intrusion)

[Package GCDkit version 6.1 Index]