Handling ADEg graphical parameters
adegpar.Rd
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.
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.
Value
Several parameters are used to create complete plot and accessible through adegpar
.
p1d
:parameters for one-dimension graphic, object of class inherited from
"ADEg.S1"
or"ADEg.C1"
horizontal
: a logical indicating if the plot is horizontalreverse
: a logical indicating if the bottom of the plot is at the bottom (forhorizontal
asTRUE
) or at the left of the device (forhorizontal
asFALSE
). If FALSE, the graphical display bottom is at the top (forhorizontal
asTRUE
) or at the right of the device (forhorizontal
asFALSE
).rug
: a list dedicated to tick marksdraw
: a logical indicating if the rugs are drawntck
: size of the rug (ticks) in proportion from the reference line and the origin of the device (0.5 by default)margin
: where to draw the reference line (0.07 by default)line
: a logical indicating if the reference line is drawn usingporigin
arguments
parrows
:arrows' parameters. see
panel.arrows
for more informationangle
: angle from the shaft of the arrow to the edge of the arrow headends
: kind of arrows to be drawn. Can befirst
,last
orboth
length
: length of the edges of the arrow head
paxes
:axis' parameters. Mostly inspired by
xyplot
function oflattice
packageaspectratio
: a character string to control physical aspect ratio of the graphic (drawing panel more specifically).iso
for isometric scales,fill
for drawing as big as possible orxy
for banking ruledraw
: a logical indicating if axis (tick marks and labels) are drawn around the graphicx
: a list used for the creation of x-axis in thetrellis
object. Seexyplot
for more informationdraw
: a logical indicating if x-axis (tick marks and labels) are drawn around the graphic
y
: the same list as forx
withdraw
parameters
pbackground
:background's parameters
col
: background colorbox
: a logical indicating if a box is drawn surrounding the plot
pellipses
:ellipses' drawing parameters
alpha
: a value between 0 and 1 controlling ellipses' background transparencyaxes
: a list dedicated to ellipses' axisdraw
: a logical indicating whether ellipses' axis are drawncol
: ellipses' axis colorlty
: line type of ellipses' axislwd
: line width of ellipses' axis
border
: ellipses's border colorlty
: line type of ellipses' borderlwd
: line width of ellipses' bordercol
: ellipses' background color
pgrid
:grid's drawing parameters
draw
: a logical indicating if grid is drawn in the backgroundcol
: grid's line colorlty
: line type of grid linelwd
: line width of grid linenint
: an integer indicating the number of grid intervals expectedtext
: a list dedicated to grid legend textcex
: text size of grid legendcol
: text color of grid legendpos
: 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 isnpc
(normalized parent coordinates).
plabels
:labels' drawing parameters
alpha
: a value between 0 and 1 controlling label transparencycex
: labels' text sizecol
: labels' text colorsrt
: labels' text orientation. It can behorizontal
,vertical
or an angle indication in degreesoptim
: a logical indicating if an algorithm is used to avoid labels' overlapping or outside limitsboxes
: label's boxes parametersdraw
: a logical indicating if labels are framedalpha
: a value between 0 and 1 controlling labels' boxes transparencyborder
: boxes' border colorcol
: boxes' background colorlty
: line type of boxes' borderlwd
: line width of boxes' border
plegend
:legend's drawing parameters (used for object of class inherited from
T.value
andS2.value
)drawKey
: a logical indicating if the legend should be drawn. Legend can be provided by thekey
argument or is automatically generated for*.class
and*.value
functionsdrawColorKey
: a logical indicating if the color legend should be drawn (only for*.image
functions)size
: size of the legend
plines
:lines' drawing parameters
col
: lines colorlty
: lines typelwd
: lines width
pnb
:drawing parameters for neighbourhood graph
edge
: edge's drawing parameterscol
: edge colorlty
: line type of edgelwd
: line width of edge
node
: node's drawing parameterspch
: node's symbol typecex
: node's symbol sizecol
: node's symbol coloralpha
: a value between 0 and 1 controlling node's symbol transparency
porigin
:drawing parameters for origin's lines. See
panel.lines
for more informationdraw
: a logical indicating if vertical and horizontal lines are drawn to indicate origininclude
: a logical indicating if origin is included in the drawing limitsorigin
: a two-length vector indicating origin coordinatesalpha
: a value between 0 and 1 controlling origin's lines transparencycol
: color of origin's lineslty
: origin's line typelwd
: origin's line width
ppalette
:a function taking one integer in argument indicating the number of expecting colors (for example using
colorRampPalette
)quanti
:adegpar()$ppalette$quanti(n)
returns n colors shaded grey to whitequali
:adegpar()$ppalette$quali(n, name)
returnsn
differentiated colors.name
argument is passed to thebrewer.pal
function of theRColorBrewer
package and must beAccent
,Dark2
,Paired
,Pastel1
,Pastel2
,Set1
(the default value),Set2
orSet3
. Whenn
is equal to 2, values for 'white' and 'black' colors are returned and can be not quite visible on the display.
ppoints
:points' drawing paameters
alpha
: a value between 0 and 1 controlling points transparencycex
: points sizecol
: points colorpch
: points typefill
: points' background color (only for filled points type)
ppolygons
:polygons' drawing parameters (used for example to draw convex hull for
S2.class
or Gaussian curves forC1.gauss
objects). Seelpolygon
for more information.border
: polygon's border colorcol
: polygon's background colorlty
: line type of polygon borderlwd
: line width of polygon borderalpha
: a value between 0 and 1 controlling polygons' background transparency
pSp
:drawing parameters for spatial object
col
: spatial object's background colorborder
: spatial object's border colorlty
: line type of spatial object borderlwd
: line width of spatial object borderalpha
: a value between 0 and 1 controlling spatial object transparency
psub
:subtitle's drawing parameters
cex
: text size of subtitlecol
: text color of subtitleposition
: 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 isnpc
(normalized parent coordinates).text
: the character string to display
ptable
:for table graphic, object of class inherited from
ADEg.T
x
: x-axis parameterssrt
: text rotationpos
: position of the axis. It can betop
orbottom
. Otherwise axis and labels' axis are not drawntck
: ticks sizeadj
: justification of labels
y
: same asx
list, but for y-axisstr
,tck
,adj
pos
: position of the axis. It can beleft
orright
. Otherwise axis and labels' axis are not drawn
margin
: margin surrounding the drawing panel. The numbers indicate thebottom
,left
,top
andright
margins. Results are obtained passingmargin
to padding argument inlattice
. Please seelayout.heights
andlayout.widths
parameters inlattice
package for more information
Author
Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray
Examples
oldparamadeg <- adegpar()
X <- data.frame(x = runif(50, -1, 2), y = runif(50, -1, 2))
s.label(X)
names(adegpar())
#> [1] "p1d" "parrows" "paxes" "pbackground" "pellipses"
#> [6] "pgrid" "plabels" "plegend" "plines" "pnb"
#> [11] "porigin" "ppalette" "ppoints" "ppolygons" "pSp"
#> [16] "psub" "ptable"
adegpar("paxes.draw", "psub.cex")
#> $paxes
#> $paxes$draw
#> [1] FALSE
#>
#>
#> $psub
#> $psub$cex
#> [1] 1
#>
#>
adegpar()$pback$col
#> [1] "white"
adegpar("paxes.draw" = TRUE, "psu.ce" = 3, "pback.col" = "grey85")
s.label(X)
adegpar(oldparamadeg)