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.adegpar(...)adegpar.
[object Object]parrows:ends: kind of arrows to be drawn. Can be first, last or bothlength: length of the edges of the arrow headpaxes:draw: a logical indicating if axis (tick marks and labels) are drawn around the graphicx: 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 graphicy: the same list as for x with draw parameterspbackground:box: a logical indicating if a box is drawn surrounding the plotpellipses:axes: a list dedicated to ellipses' axis draw: a logical indicating whether ellipses' axis are drawncol: ellipses' axis colorlty: line type of ellipses' axislwd: line width of ellipses' axisborder: ellipses's border colorlty: line type of ellipses' borderlwd: line width of ellipses' bordercol: ellipses' background colorpgrid:col: 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 is npc (normalized parent coordinates).plabels:cex: labels' text sizecol: labels' text colorsrt: labels' text orientation. It can be horizontal, 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 parameters draw: 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' borderplegend:drawColorKey: a logical indicating if the color
legend should be drawn (only for *.image functions)size: size of the legendplines:lty: lines typelwd: lines widthpnb:lwd: line width of edgenode: node's drawing parameters pch: node's symbol typecex: node's symbol sizecol: node's symbol coloralpha: a value between 0 and 1 controlling node's symbol transparencyporigin:include: 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 widthppalette: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 sizecol: points colorpch: points typefill: points' background color (only for filled points type)ppolygons:col: polygon's background colorlty: line type of polygon borderlwd: line width of polygon borderalpha: a value between 0 and 1 controlling polygons' background transparencypSp:border: 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 transparencypsub:col: 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 is npc (normalized parent coordinates).text: the character string to displayptable:tck: ticks sizeadj: justification of labelsy: same as x list, but for y-axis str,tck,adjpos: position of the axis. It can be left or right. Otherwise axis and labels' axis are not drawnmargin: 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 informationADEg.Tx: x-axis parameterssrt: text rotationpos: position of the axis. It can betoporbottom. Otherwise axis and labels' axis are not drawnplabels = 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.ADEg
paroldparamadeg <- 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