plot.trifield(trifield)
plot.trifield()所属R语言包:trifield
Plot a ternary field
绘制一个三元领域
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A simple wrapper around image and contour for plotting ternary fields
一个简单的包装图像和轮廓绘制三元领域的
用法----------Usage----------
## S3 method for class 'trifield'
plot(x, contours = TRUE, col = topo.colors(256), lab1 = "A = 0", lab2 = "B = 0", lab3 = "C = 0", tribox = TRUE, axis.lines = TRUE, ...)
参数----------Arguments----------
参数:x
An object of class trifield
对象的类trifield
参数:contours
Make contours?
使轮廓?
参数:col
Color palette to use
使用的调色板
参数:lab1
First axis label
第一轴标签
参数:lab2
Second axis label
二轴标签
参数:lab3
Third axis label
第三轴标签
参数:tribox
Draw a triangle around the plot?
画一个三角形周围的图吗?
参数:axis.lines
Draw internal (altitute) axis lines?
绘制内部轴线(海拔高度)?
参数:...
Additional graphics parameters to be passed to plot
额外的图形来传递参数,绘制
Details
详细信息----------Details----------
This is a small demo function showing how one can make a ternary contour plot from a trifield object. The input object can be any list with x, y and z fields, but the result will be odd if non-NA z-values fall outside an equilateral triangle with unit altitude.
这是一个小的演示功能可以使三元等高线图,从trifield对象。输入对象可以是任何具有x,y和z的字段列表,但得到的结果将是奇数,如果非NA z值的属于一个等边三角形的单位高度。
值----------Value----------
None
无
(作者)----------Author(s)----------
Tim Keitt <tkeitt@gmail.com>
参见----------See Also----------
plot.default, image.default, contour.default
plot.default,image.default,contour.default
实例----------Examples----------
## The function is currently defined as[#功能目前被定义为]
function(x, contours = TRUE,
col = topo.colors(256),
lab1 = 'A = 0', lab2 = 'B = 0',
lab3 = 'C = 0', tribox = TRUE,
axis.lines = TRUE, ...)
{
lx = 2 / sqrt(3)
plot(range(x$x), range(x$y), type = 'n', asp = 1,
axes = F, xlab = NA, ylab = NA, xpd = NA, ...)
image(x, col = col, add = TRUE)
if ( axis.lines ) triaxes()
if ( contours ) contour(x, add = TRUE)
if ( !is.na(lab1) )
text(lx / 6 - 0.06, 1 / 3, lab3, srt = 60)
if ( !is.na(lab2) )
text(2 * lx / 3 + 0.06, 2 / 3, lab2, srt = -60)
if ( !is.na(lab3) )
text(2 * lx / 3, -0.06, lab1)
if ( tribox ) tribox(lwd = 3)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|