rp.tkrplot(rpanel)
rp.tkrplot()所属R语言包:rpanel
rpanel calls for tkrplot and tkrreplot
rpanel的要求tkrplot和tkrreplot
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions call Luke Tierney's tkrplot and tkrreplot functions to allow R graphics to be displayed in a panel.
这些函数调用卢克·蒂尔尼的tkrplot和tkrreplot功能,让R图形显示在面板。
用法----------Usage----------
rp.tkrplot(panel, name, plotfun, action = NA, mousedrag = NA,
mouseup = NA, hscale = 1, vscale = 1, parent = window, pos = NULL,
foreground = NULL, margins = c(0, 0, 0, 0), ...)
rp.tkrreplot(panel, name)
参数----------Arguments----------
参数:panel
the panel in which the plot should appear. This may be passed as a panelname string or the panel object itself.
面板在应该出现的图。这可能是通过作为一个panelname的字符串或面板对象本身。
参数:name
the name of the plot. This is subsequently used in tkrreplot to specify the plot to be redrawn.
名称的图。这随后用于tkrreplot的指定的图,将被刷新。
参数:plotfun
the function used to create the plot.
该函数用于创建的图。
参数:action
the function called when the plot is clicked.
调用的函数,时单击该图。
参数:mousedrag
the function called when the mouse is dragged.
拖动鼠标时调用的函数。
参数:mouseup
the function called when the mouse is released.
调用的函数,当鼠标被释放。
参数:parent
this specifies the widget inside which the plot should appear. In the current version of rpanel, it should not normally be used.
指定小工具里面的图出现。在的当前版本rpanel,通常不应使用。
参数:hscale
horizontal scaling factor to control the width of the plot.
水平缩放因子控制的宽度的图。
参数:vscale
vertical scaling factor to control the height of the plot.
垂直缩放因子,控制高度的图。
参数:pos
the layout instructions. Please see the rp.pos example and help for full details.
布局说明。请看看rp.pos榜样和帮助的完整细节。
参数:foreground
the filename of a transparent gif file. This will be overlaid on the tkrplot image.
透明的gif文件的文件名。这将上tkrplot图像重叠。
参数:margins
an integer vector of length 4 giving the margin sizes, in pixels and in the usual order, for the placing of the foreground image.
给一个整数向量的长度为4的边距大小,以像素为单位,在通常的顺序,配售的前景图像。
参数:...
information for pos can be passed individually as additional arguments.
pos的信息可以通过单独作为附加参数。
Details
详细信息----------Details----------
The function action should take one argument, which should be the panel to which the tkrplot is attached.
函数action应该接受一个参数,这应该是面板的tkrplot连接。
See rp.grid for details of the grid layout system.
见rp.grid的网格布局系统的详细信息。
值----------Value----------
If the parameter panel is the panelname string the same string is returned. If the panel object is used the altered panel is assigned to both the calling level and panel's environment level.
如果该参数面板是panelname的的字符串相同的字符串返回。如果面板对象是用来改变的面板被分配到的层次和面板的环境。
警告----------Warning----------
The action function should return the panel. Without this assignment any widgets added or alterations made to panel parameters within the action function will be lost.
action函数应该返回面板。如果没有这个任务,任何部件或内action功能面板参数的改变将会丢失。
参考文献----------References----------
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
参见----------See Also----------
rp.image
rp.image
实例----------Examples----------
if (interactive()) {
draw <- function(panel) {
plot(1:20, (1:20)^panel$h)
panel
}
redraw <- function(panel) {
rp.tkrreplot(panel, tkrp)
panel
}
rpplot <- rp.control(title = "Demonstration of rp.tkrplot", h = 1)
rp.tkrplot(rpplot, tkrp, draw)
rp.slider(rpplot, h, action = redraw, from = 0.05, to = 2.00, resolution = 0.05)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|