simpleKey(lattice)
simpleKey()所属R语言包:lattice
Function to generate a simple key
函数来生成一个简单的关键
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Simple interface to generate a list appropriate for draw.key
简单的界面,生成合适的draw.key列表
用法----------Usage----------
simpleKey(text, points = TRUE,
rectangles = FALSE,
lines = FALSE,
col, cex, alpha, font,
fontface, fontfamily,
lineheight, ...)
参数----------Arguments----------
参数:text
character or expression vector, to be used as labels for levels of the grouping variable
字符或表达向量,被用来作为分组变量水平的标签
参数:points
logical
逻辑
参数:rectangles
logical
逻辑
参数:lines
logical
逻辑
参数:col, cex, alpha, font, fontface, fontfamily, lineheight
Used as top-level components of the list produced, to be used for the text labels. Defaults to the values in trellis.par.get("add.text")
作为顶级组件产生的名单,被用于文本标签。到trellis.par.get("add.text")值默认值
参数:...
further arguments added to the list, eventually passed to draw.key
进一步的参数添加到列表中,最终传递draw.key的
Details
详情----------Details----------
A lattice plot can include a legend (key) if an appropriate list is specified as the key argument to a high level Lattice function such as xyplot. This key can be very flexible, but that flexibility comes at a cost: this list needs to be fairly complicated even in simple situations. simpleKey is designed as a useful shortcut in the common case of a key drawn in conjunction with a grouping variable, using the default graphical settings.
格子图可以包括一个传说(键),如果适当的列表作为key参数指定一个高层次的格子为xyplot等功能。此键可以非常灵活,但这种灵活性是有代价的:这个名单需要相当复杂,即使在简单的情况下。 simpleKey设计作为一种常见的情况,在结合分组变量绘制一个关键的有用快捷,使用默认的图形设置。
The simpleKey function produces a suitable key argument using a simpler interface. The resulting list will use the text argument as a text component, along with at most one set each of points, rectangles, and lines. The number of entries (rows) in the key will be the length of the text component. The graphical parameters for the additional components will be derived from the default graphical settings (wherein lies the simplification, as otherwise these would have to be provided explicitly).
simpleKey函数产生一个合适的key参数,使用一个简单的接口。由此产生的名单将作为一个文本组件使用text参数,最多一组的每一个点,矩形和线条。条目数(行)中的关键将是text组件的长度。附加组件的图形参数,将来自默认的图形设置(其中在于简化,否则,这些都必须显式提供)。
Calling simpleKey directly is usually unnecessary. It is most commonly invoked (during the plotting of the "trellis" object) when the auto.key argument is supplied in a high-level plot with a groups argument. In that case, the text argument of simpleKey defaults to levels(groups), and the defaults for the other arguments depend on the relevant high-level function. Note that these defaults can be overridden by supplying auto.key as a list containing the replacement values.
调用simpleKey直接通常是不必要的。这是最常见的调用(在"trellis"对象绘图)时auto.key参数groups参数提供一个高层次的图。在这种情况下,textsimpleKey默认levels(groups),和其他参数的默认参数,取决于有关的高层次功能。请注意,这些默认值可以通过提供auto.key包含的替换值的列表覆盖。
值----------Value----------
A list that would work as the key argument to xyplot, etc.
key等xyplot参数工作列表
作者(S)----------Author(s)----------
Deepayan Sarkar <a href="mailtoeepayan.Sarkar@R-project.org">Deepayan.Sarkar@R-project.org</a>
参见----------See Also----------
Lattice, draw.key, trellis.par.get, and xyplot, specifically the entry for auto.key.
Lattice,draw.key,trellis.par.get,xyplot,特别是进入auto.key。
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|