DisplayPars-class {GenomeGraphs} | R Documentation

## Class "DisplayPars" is used to specify graphical parameters to gdObjects.

### Description

The DisplayPars functions analagously to par and gp. Generally the class is instantiated using the `DisplayPars` function rather than directly.

### Objects from the Class

Objects can be created by calls of the form `DisplayPars(...)` rather than calls to: `new("DisplayPars", ...)` by calling the `DisplayPars` function directly in the constructor the gdObjects are guaranteed to have the appropriate defaults.

### Slots

`pars`:

  Object of class `"environment"` Generally this slot is not accessed directly.

### Methods

getPar

  `signature(obj = "DisplayPars")`: gets a graphical parameter by name

initialize

  `signature(.Object = "DisplayPars")`: This constructor should not be called directly.

setPar

  `signature(obj = "DisplayPars")`: sets a graphical parameter - see the example below. Often it is easier to set the graphical parameter from within the gdObject.

show

  `signature(object = "DisplayPars")`: prints current graphical parameters

### Warning

The `DisplayPars` class should not be manipulated directly. The preferred method for interacting with the class can be seen in the example below.

### Author(s)

James Bullard

### Examples

    showClass("DisplayPars")

    if (interactive()) {
    minbase = 10000
    maxbase = 15000
    mart <- useMart("ensembl", dataset = "scerevisiae_gene_ensembl")
    genesplus <- new("GeneRegion", start = minbase, end = maxbase, biomart = mart,
                    strand = "+", chromosome = "I", dp = DisplayPars(size = 2))
    ## plot it.
    gdPlot(list(genesplus, new("Title", title = "genes")), minbase, maxbase)

    ## to obtain a list of the current graphical parameters:
    print(genesplus@dp)

    ## to set a parameter:
    setPar(genesplus, "protein_coding", "pink")
    gdPlot(list(genesplus, new("Title", title = "genes")), minbase, maxbase)
    }

[Package GenomeGraphs version 1.42.0 Index]