txtplot(txtplot)
txtplot()所属R语言包:txtplot
Ascii graphics
ASCII图形
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Provides a function to produce rudimentary ascii graphics directly in the terminal window.
提供了一个基本的ASCII图形的功能,直接在终端窗口中。
txtplot provides the basic plotting function of two numeric vectors. All other functions below are based on this.<br> txtcurve is a text based equivalent of the curve function<br> txtdensity is a text based density estimation function based on the density function<br> txtacf is a text based equivalent of the acf function and based on the acf function.<br> txtbarchart is a text based barplot and plots the relative frequences of the occurences of the different levels of a factor (in percent)
txtplot两个数值向量提供了基本的绘图功能。所有其他功能的基础上。<BR>txtcurve是一个基于文本的相当于curve功能<BR>txtdensity是一个基于文本的密度估计函数的基础上的density的功能<BR>“txtacf是acf功能相当于一个基于文本的和根据acf功能。<BR> txtbarchart是一个基于文本的barplot绘制的相对频率的频道出现的不同层次的因素(%)
用法----------Usage----------
txtplot(x, y = NULL, pch = "*", width = round(options()$width*0.8),
height = round(0.25*width), xlab = NULL, ylab = NULL,
xlim = NULL, ylim = NULL)
txtcurve(expr, from = NULL, to = NULL, n = 101,
pch = "*", width = round(options()$width*0.8),
height = round(0.25*width), xlab = NULL, ylab = NULL)
txtdensity(x, pch = "*", width = round(options()$width*0.8),
height = round(0.25*width), xlab = NULL, ylab = NULL)
txtacf(x, pch = "*", lag.max = 20, type = c("correlation", "covariance", "partial"),
na.action = na.fail, demean = TRUE, width = round(options()$width*0.8),
height = round(0.25*width), xlab = NULL, ylab = NULL)
txtbarchart(x, pch = "*", width = round(options()$width*0.8),
height = round(0.25*width), ylab = NULL)
参数----------Arguments----------
参数:x
numeric containing the x-values to plot (for txtbarchart this needs to be of class factor). NA, NaN are removed for plotting. Infinities cause an error
数字包含的x值图(txtbarchart这需要的类因子)。 NA大,NaN被删除的图。无穷大造成的错误
参数:y
numeric containing the x-values to plot (needs to be of the same length as x). If NULL the numeric x is plotted against 1:length(x). NA, NaN are removed for plotting. Infinities cause an error
数字含有的x值的积(需要具有相同的长度为x)。如果为NULL数字x暗算1:length(x)。 NA大,NaN被删除的图。无穷大造成的错误
参数:pch
Plotting symbol
绘图符号
参数:width, height
Width and height of the plots in points
以点的曲线的宽度和高度
参数:xlab, ylab
labels for x and y axis
为x和y轴的标签
参数:xlim, ylim
limits for x and y axis in plot, if equal to NULL automatically determined from x and y.
为x和y轴在图的限制,如果等于NULL自动确定从x和y。
参数:expr
An expression to plot (containing x)
图(包含x)的表达式,
参数:from,to
Defines boundaries of plotting region for expr in txtcurve
定义画图区域的边界expr的txtcurve
参数:n
integer specifying the number of x values between from and to
整数,并从指定的x值之间
参数:lag.max, type, na.action, demean
arguments for call of acf function, see ?acf for details
acf函数调用的参数,请参阅ACF的详细信息,
注意----------Note----------
Due to rounding to a relatively crude grid results can only be approximate! The equally spaced axis ticks, for example, may be non-equally spaced in the plot.
由于舍入到一个相对粗糙的网格结果只能是近似!等距轴刻度线,例如,可能是在图非等距隔开。
Due to the crude grid also there might be several points per pixel. The function uses the same plotting symbol no matter how many points coincide on one pixel
由于粗网格,也有可能是几个点,每个像素。该函数使用相同的绘图符号,不管多少点重合在一个像素点
(作者)----------Author(s)----------
Bjoern Bornkamp
参见----------See Also----------
txtboxplot
txtboxplot
实例----------Examples----------
## basic plotting function[#基本的绘图功能]
require(stats)
txtplot(cars[,1], cars[,2])
## can include axis labels when desired[#可以包括轴时所需的标签]
txtplot(cars[,1], cars[,2], xlab = "speed", ylab = "distance")
## text based density plot[基于文本的密度图]
txtdensity(rnorm(500))
## text based plotting of functions[#基于文本的绘制功能]
txtcurve(x/(x+1), 0, 4, xlab = "Emax model")
## text based acf[基于文本的ACF]
txtacf(rnorm(100))
## text based barchart[基于文本的净值表]
x <- factor(c("orange", "orange", "red", "green", "green", "red",
"yellow", "purple", "purple", "orange"))
txtbarchart(x)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|