Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
理解计时器中的PAR;显示列表_R - Fatal编程技术网

理解计时器中的PAR;显示列表

理解计时器中的PAR;显示列表,r,R,我记录了一个函数创建的绘图。该函数设置各种par()值,以便三个图表可以以各种颜色显示在同一页面上: library( PerformanceAnalytics ) data( managers ) # write the plot to the open device suppressWarnings(charts.RollingRegression(managers[, 1:6], managers[, 8, drop=FALSE], Rf = .04/12, colorset = ric

我记录了一个函数创建的绘图。该函数设置各种par()值,以便三个图表可以以各种颜色显示在同一页面上:

library( PerformanceAnalytics )
data( managers )

# write the plot to the open device
suppressWarnings(charts.RollingRegression(managers[, 1:6], managers[, 8, drop=FALSE], Rf = .04/12, colorset = rich6equal, legend.loc="topleft"))

# record = investigate the primitive calls
recorded = recordPlot()
lapply(recorded[[1]], "[[", 1 )

# show the last instruction - the par call that does most of the par work
recorded[[ 1 ]][[ 54 ]]

我不理解最后一个原始调用是如何“Par”的(并且包含在同一页面上显示三个图表所需的PAR值的大部分)。这显示在最后/底部图表的“plot.new”之后(您可以检查“title”以确认)。如果指令是按顺序执行的,那么par()将最后应用,布局将变得一团糟。由于需要

plot.new()


我不明白
replayPlot()
如何用正确的par()设置重建绘图。有人能详细说明一下吗?

如果我一直在写recordPlot,我会尝试在启动点收集现有的par()设置,以便在退出和重新进入后可以恢复它们(使用par()调用)。

这里张贴了后续文章:有3个box()-es和一堆axis()-所以我想可能没有使用布局。当我应用所有指令时,图表显示为每页1个,但是如果我从函数中设置布局和第一个par(),然后应用所有指令,图表看起来很棒。