找回密码
 注册
查看: 361|回复: 0

R语言 spatstat包 colourmap()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 13:17:44 | 显示全部楼层 |阅读模式
colourmap(spatstat)
colourmap()所属R语言包:spatstat

                                        Colour Lookup Tables
                                         颜色查找表

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Create a colour map (colour lookup table).
创建色彩映射(颜色查找表)。


用法----------Usage----------


colourmap(col, ..., range=NULL, breaks=NULL, inputs=NULL)



参数----------Arguments----------

参数:col
Vector of values specifying colours
向量的值指定颜色


参数:...
Ignored.
忽略。


参数:range
Interval to be mapped. A numeric vector of length 2, specifying the endpoints of the range of values to be mapped. Incompatible with breaks or inputs.  
被映射的时间间隔。长度为2的数值的矢量,指定要被映射的值的范围内的端点。不兼容的breaks或inputs。


参数:inputs
Values to which the colours are associated. A factor or vector of the same length as col. Incompatible with breaks or range.  
值的颜色相关联。一个因素或矢量的相同长度的col。不兼容的breaks或range。


参数:breaks
Breakpoints for the colour map. A numeric vector of length equal to length(col)+1. Incompatible with range or inputs.  
断点的彩色图。一个数字矢量的长度等于length(col)+1。不兼容的range或inputs。


Details

详细信息----------Details----------

A colour map is a mechanism for associating colours with data. It can be regarded as a function, mapping data to colours.
颜色表的颜色与数据相关联的机制。它可以被视为一个函数,将数据映射到颜色。

The command colourmap creates an object representing a colour map, which can then be used to control the plot commands in the spatstat package. It can also be used to compute the colour assigned to any data value.
命令colourmap创建一个对象,表示一个颜色的图,它可以被用来控制spatstat包的绘图命令。它也可以被用于计算分配到任何数据值的颜色。

The argument col specifies the colours to which data values will be mapped. It should be a vector whose entries can be interpreted as colours by the standard R graphics system. The entries can be string names of colours like "red", or integers that refer to colours in the standard palette, or strings containing six-letter hexadecimal codes like "#F0A0FF".
参数col的数据值将被映射到指定的颜色。它应该是一个向量,其可以解释为通过标准的R图形系统的颜色的条目。参赛作品可以是字符串名称的颜色,如"red",或参考标准调色板中的颜色,或字符串包含六个字母的十六进制代码,如"#F0A0FF"的整数。

Exactly one of the arguments range, inputs or breaks must be specified by name.
究竟的参数之一range,inputs或breaks必须指定的名称。

If inputs is given, then it should be a vector or factor, of the same length as col. The entries of inputs can be any atomic type (e.g. numeric, logical, character, complex) or factor values. The resulting colour map associates the value inputs[i] with the colour col[i].
如果inputs给定的,那么它应该是一个向量或因素,相同长度的col。 inputs的条目可以是任何原子类型(例如,数字,逻辑,性格,复杂的)因素值。由此产生的颜色图联营公司的价值inputs[i]col[i]的颜色。

If range is given, then it determines the interval of the real number line that will be mapped. It should be a numeric vector of length 2.
range如果,然后确定的实数线将被映射的时间间隔。它应该是一个数值向量的长度为2。

If breaks is given, then it determines the precise intervals of the real number line which are mapped to each colour. It should be a numeric vector, of length at least 2, with entries that are in increasing order. Infinite values are allowed. Any number in the range between breaks[i] and breaks[i+1] will be mapped to the colour col[i].
如果breaks被给出,则它确定每种颜色被映射到实数线上的精确的时间间隔。的长度至少为2,它应该是一个数值向量,以递增顺序的条目。无穷大值是允许的。任何breaks[i]和breaks[i+1]将被映射的颜色col[i]之间的范围。

The result is an object of class "colourmap".  There are print and plot methods for this class. Some plot commands in the spatstat package accept an object of this class as a specification of the colour map.
其结果是一个对象的类"colourmap"。有print和plot这个类的方法。 spatstat包的一些绘图命令接受这个类的对象作为规范的彩色图。

The result is also a function f which can be used to compute the colour assigned to any data value.  That is, f(x) returns the character value of the colour assigned to x. This also works for vectors of data values.
其结果是也f可用于计算分配到任何数据值的颜色的功能。也就是说,f(x)返回字符值的颜色分配给x。这也适用于数据值的矢量。


值----------Value----------

A function, which is also an object of class "colourmap".
的功能,这也是一个对象类"colourmap"。


(作者)----------Author(s)----------


Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>




参见----------See Also----------

The plot method plot.colourmap.
图法plot.colourmap。

See the R help file on colours for information about the colours that R recognises, and how to manipulate them.
见的Rcolours的R识别的颜色的信息,帮助文件,以及如何操作它们。

See colourtools for more tools to manipulate colours.
见colourtools更多的工具来处理颜色的。

See lut for lookup tables.
见lut查找表。


实例----------Examples----------


  # colour map for real numbers, using breakpoints[彩色图的实数,使用断点]
  cr <- colourmap(c("red", "blue", "green"), breaks=c(0,5,10,15))
  cr
  cr(3.2)
  cr(c(3,5,7))
  # a large colour map[一个大的彩色图]
  co <- colourmap(rainbow(100), range=c(-1,1))
  co(0.2)
  # colour map for discrete set of values[组离散值的彩色图]
  ct <- colourmap(c("red", "green"), inputs=c(FALSE, TRUE))
  ct(TRUE)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-12 20:36 , Processed in 0.034185 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表