Learn R Programming

adegraphics (version 1.0-3)

adegpar: Handling ADEg graphical parameters

Description

adegpar can be used to set or query graphical parameters used in ADEg object display. It is inspired by the par function of graphics package.

Usage

adegpar(...)

Arguments

...
If it is empty, the return value is a named list containing all the current settings. If it is a string of characters, the corresponding sub-list of parameters is return as information. If it is a list containing keys and values, the cor

Value

  • Several parameters are used to create complete plot and accessible through adegpar. [object Object]

item

  • parrows:
  • ends: kind of arrows to be drawn. Can be first, last or both
  • length: length of the edges of the arrow head
  • paxes:
  • draw: a logical indicating if axis (tick marks and labels) are drawn around the graphic
  • x: a list used for the creation of x-axis in the trellis object. See xyplot for more information
    • draw: a logical indicating if x-axis (tick marks and labels) are drawn around the graphic
  • y: the same list as for x with draw parameters
  • pbackground:
  • box: a logical indicating if a box is drawn surrounding the plot
  • pellipses:
  • axes: a list dedicated to ellipses' axis
    • draw: a logical indicating whether ellipses' axis are drawn
    col: ellipses' axis color lty: line type of ellipses' axis lwd: line width of ellipses' axis
  • border: ellipses's border color
  • lty: line type of ellipses' border
  • lwd: line width of ellipses' border
  • col: ellipses' background color
  • pgrid:
  • col: grid's line color
  • lty: line type of grid line
  • lwd: line width of grid line
  • nint: an integer indicating the number of grid intervals expected
  • text: a list dedicated to grid legend text
    • cex: text size of grid legend
    col: text color of grid legend pos: a character string (topright, topleft, bottomleft, bottomright) or a vector of length 2 indicating text position of grid legend. If it is a vector, the default unit is npc (normalized parent coordinates).
  • plabels:
  • cex: labels' text size
  • col: labels' text color
  • srt: labels' text orientation. It can be horizontal, vertical or an angle indication in degrees
  • optim: a logical indicating if an algorithm is used to avoid labels' overlapping or outside limits
  • boxes: label's boxes parameters
    • draw: a logical indicating if labels are framed
    alpha: a value between 0 and 1 controlling labels' boxes transparency border: boxes' border color col: boxes' background color lty: line type of boxes' border lwd: line width of boxes' border
  • plegend:
  • drawColorKey: a logical indicating if the color legend should be drawn (only for *.image functions)
  • size: size of the legend
  • plines:
  • lty: lines type
  • lwd: lines width
  • pnb:
  • lwd: line width of edge
  • node: node's drawing parameters
    • pch: node's symbol type
    cex: node's symbol size col: node's symbol color alpha: a value between 0 and 1 controlling node's symbol transparency
  • porigin:
  • include: a logical indicating if origin is included in the drawing limits
  • origin: a two-length vector indicating origin coordinates
  • alpha: a value between 0 and 1 controlling origin's lines transparency
  • col: color of origin's lines
  • lty: origin's line type
  • lwd: origin's line width
  • ppalette:
  • quali: adegpar()$ppalette$quali(n, name) returns n differentiated colors. name argument is passed to the brewer.pal function of the RColorBrewer package and must be Accent, Dark2, Paired, Pastel1, Pastel2, Set1 (the default value), Set2 or Set3. When n is equal to 2, values for 'white' and 'black' colors are returned and can be not quite visible on the display.
  • ppoints:
  • cex: points size
  • col: points color
  • pch: points type
  • fill: points' background color (only for filled points type)
  • ppolygons:
  • col: polygon's background color
  • lty: line type of polygon border
  • lwd: line width of polygon border
  • alpha: a value between 0 and 1 controlling polygons' background transparency
  • pSp:
  • border: spatial object's border color
  • lty: line type of spatial object border
  • lwd: line width of spatial object border
  • alpha: a value between 0 and 1 controlling spatial object transparency
  • psub:
  • col: text color of subtitle
  • position: a character string (topright, topleft, bottomleft, bottomright) or a vector of length 2 indicating text position of subtitle. If it is a vector, the default unit is npc (normalized parent coordinates).
  • text: the character string to display
  • ptable:
  • tck: ticks size
  • adj: justification of labels
  • y: same as x list, but for y-axis
    • str,tck,adj
    pos: position of the axis. It can be left or right. Otherwise axis and labels' axis are not drawn
  • margin: margin surrounding the drawing panel. The numbers indicate the bottom, left, top and right margins. Results are obtained passing margin to padding argument in lattice. Please see layout.heights and layout.widths parameters in lattice package for more information

code

ADEg.T

itemize

  • x: x-axis parameters
    • srt: text rotation
  • pos: position of the axis. It can betoporbottom. Otherwise axis and labels' axis are not drawn

Details

The graphical parameters control apparency of the graphic. Calls can be made using either a list of list (e.g. plabels = list(col = "red")) or a list grouping both keys with "." (e.g. plabels.col = "red"). Parameters are re-used if needed in all ADEg object. If set globally, meaning using adegpar, all created objects afterwards will be affected.

See Also

ADEg par

Examples

Run this code
oldparamadeg <- adegpar()
    
X <- data.frame(x = runif(50, -1, 2), y = runif(50, -1, 2))
s.label(X)
names(adegpar())
adegpar("paxes.draw", "psub.cex")
adegpar()$pback$col
adegpar("paxes.draw" = TRUE, "psu.ce" = 3, "pback.col" = "grey85")
s.label(X)

adegpar(oldparamadeg)

Run the code above in your browser using DataLab