adegpar | R Documentation |
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(...)
... |
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 corresponding changes in current settings are made. |
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.
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 horizontal
reverse
: a logical indicating if the bottom of the plot is at the bottom (for horizontal
as TRUE
)
or at the left of the device (for horizontal
as FALSE
). If FALSE, the graphical display bottom is at the top
(for horizontal
as TRUE
) or at the right of the device (for horizontal
as FALSE
).
rug
: a list dedicated to tick marks
draw
: a logical indicating if the rugs are drawn
tck
: 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 using porigin
arguments
parrows
:arrows' parameters. see panel.arrows
for more information
angle
: angle from the shaft of the arrow to the edge of the arrow head
ends
: kind of arrows to be drawn. Can be first
, last
or both
length
: length of the edges of the arrow head
paxes
:axis' parameters. Mostly inspired by xyplot
function of lattice
package
aspectratio
: 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 or xy
for banking rule
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
:background's parameters
col
: background color
box
: 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 transparency
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
:grid's drawing parameters
draw
: a logical indicating if grid is drawn in the background
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
:labels' drawing parameters
alpha
: a value between 0 and 1 controlling label transparency
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
:legend's drawing parameters (used for object of class inherited from T.value
and S2.value
)
drawKey
: a logical indicating if the legend should
be drawn. Legend can be provided by the key
argument or
is automatically generated for *.class
and *.value
functions
drawColorKey
: 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 color
lty
: lines type
lwd
: lines width
pnb
:drawing parameters for neighbourhood graph
edge
: edge's drawing parameters
col
: edge color
lty
: line type of edge
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
:drawing parameters for origin's lines. See panel.lines
for more information
draw
: a logical indicating if vertical and horizontal lines are drawn to indicate origin
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
: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 white
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
:points' drawing paameters
alpha
: a value between 0 and 1 controlling points transparency
cex
: points size
col
: points color
pch
: points type
fill
: 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 for C1.gauss
objects). See lpolygon
for more information.
border
: polygon's border color
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
:drawing parameters for spatial object
col
: spatial object's background color
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
:subtitle's drawing parameters
cex
: text size of subtitle
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
:for table graphic, object of class inherited from ADEg.T
x
: x-axis parameters
srt
: text rotation
pos
: position of the axis. It can be top
or bottom
. Otherwise axis and labels' axis are not drawn
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
Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray
ADEg
par
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.