simpleTheme(lattice)
simpleTheme()所属R语言包:lattice
Function to generate a simple theme
函数来生成一个简单的主题
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Simple interface to generate a list appropriate as a theme, typically used as the par.settings argument in a high level call
简单的界面,生成列表适当的主题,在一个高层次的调用par.settings参数通常使用
用法----------Usage----------
simpleTheme(col, alpha,
cex, pch, lty, lwd, font, fill, border,
col.points, col.line,
alpha.points, alpha.line)
参数----------Arguments----------
参数:col, col.points, col.line
A color specification. col is used for components "plot.symbol", "plot.line", "plot.polygon", "superpose.symbol", "superpose.line", and "superpose.polygon". col.points overrides col, but is used only for "plot.symbol" and "superpose.symbol". Similarly, col.line overrides col for "plot.line" and "superpose.line". The arguments can be vectors, but only the first component is used for scalar targets (i.e., the ones without "superpose" in their name).
颜色规范。 col组件"plot.symbol","plot.line","plot.polygon","superpose.symbol","superpose.line","superpose.polygon"。 col.points覆盖col,但只"plot.symbol"和"superpose.symbol"使用。同样,col.line覆盖col"plot.line"和"superpose.line"了。参数可以是向量,但只有第一部分是标量的目标(即,没有"superpose"在其名称中的)。
参数:alpha, alpha.points, alpha.line
A numeric alpha transparency specification. The same rules as col, etc., apply.
一个数字Alpha透明度规范。适用相同的规则,为的col,等。
参数:cex, pch, font
Parameters for points. Applicable for components plot.symbol (for which only the first component is used) and superpose.symbol (for which the arguments can be vectors).
参数点。组件适用plot.symbol(这只是第一部分)和superpose.symbol(参数可以是向量)。
参数:lty, lwd
Parameters for lines. Applicable for components plot.line (for which only the first component is used) and superpose.line (for which the arguments can be vectors).
参数线。组件适用plot.line(这只是第一部分)和superpose.line(参数可以是向量)。
参数:fill
fill color, applicable for components plot.symbol, plot.polygon, superpose.symbol, and superpose.polygon.
填充颜色,适用的组件plot.symbol,plot.polygon,superpose.symbol和superpose.polygon。
参数:border
border color, applicable for components plot.polygon and superpose.polygon.
边框颜色,适用于组件plot.polygon和superpose.polygon。
Details
详情----------Details----------
The appearance of a lattice display depends partly on the “theme” active when the display is plotted (see trellis.device for details). This theme is used to obtain defaults for various graphical parameters, and in particular, the auto.key argument works on the premise that the same source is used for both the actual graphical encoding and the legend. The easiest way to specify custom settings for a particular display is to use the par.settings argument, which is usually tedious to construct as it is a nested list. The simpleTheme function can be used in such situations as a wrapper that generates a suitable list given parameters in simple name=value form, with the nesting made implicit. This is less flexible, but straightforward and sufficient in most situations.
格子显示的外观在一定程度上取决于“为主题的”活跃时显示绘制(见trellis.device细节)。这个主题被用来获取各种图形参数的默认值,auto.key参数,特别是工作的前提,实际图形的编码和传说中使用相同的源。指定一个特定的显示自定义设置的最简单方法是使用par.settings的说法,这通常是乏味的构造,因为它是一个嵌套列表。在这种情况下,可以使用simpleTheme函数生成一个合适的列表,在简单的name=value形式给定的参数作为包装,作出隐含的嵌套。这是不太灵活,但在大多数情况下,简单和足够的。
值----------Value----------
A list that would work as the theme argument to trellis.device and trellis.par.set, or as the par.settings argument to any high level lattice function such as xyplot.
列表,将工作作为theme参数trellis.device和trellis.par.set或par.settings任何高层次格的功能,如xyplot参数。
作者(S)----------Author(s)----------
Deepayan Sarkar <a href="mailtoeepayan.Sarkar@R-project.org">Deepayan.Sarkar@R-project.org</a>, based on a
suggestion from John Maindonald.
参见----------See Also----------
trellis.device, xyplot, Lattice
trellis.device,xyplot,Lattice
举例----------Examples----------
str(simpleTheme(pch = 16))
dotplot(variety ~ yield | site, data = barley, groups = year,
auto.key = list(space = "right"),
par.settings = simpleTheme(pch = 16),
xlab = "Barley Yield (bushels/acre) ",
aspect=0.5, layout = c(1,6))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|