[英]How to edit R plots generated by other function that uses plot to create it?
I'm using the EFACompData
from the package RGenData
, which can create a plot. 我正在使用EFACompData
软件包中的RGenData
,它可以创建绘图。 However, I want to remove the frame from that plot. 但是,我想从该绘图中删除框架。 How can I do it? 我该怎么做? The function EFACompData
does not have an option to do it. 函数EFACompData
没有执行此操作的选项。
x <- matrix(nrow = 200, ncol = 9)
for (i in 1:3) {
shared <- rchisq(200, 1)
for (j in 1:3) {
x[, (i - 1) * 3 + j] <- shared + rchisq(200, 1)
}
}
EFACompData(x, f.max = 5,graph = T)
Since EFACompData
uses base graphics, you could try modifying graphical parameters via suitable par
settings prior to calling the plot function. 由于EFACompData
使用基本图形,因此您可以在调用绘图函数之前尝试通过适当的par
设置修改图形参数。 For example, 例如,
par(bty = "n")
EFACompData(x, f.max = 5, graph = TRUE)
will suppress the box surrounding the plot region. 将取消围绕绘图区域的框。 Of course, this only works if the plot function doesn't modify the parameter itself. 当然,这仅在plot函数未修改参数本身的情况下有效。 For EFACompData
it works. 对于EFACompData
它可以工作。 See help("par")
for further graphical parameters. 有关更多图形参数,请参见help("par")
。
Note that subsequent "editing" of base graphics is limited to adding things to the current plot via low-level plotting commands such as points
, lines
, text
, title
, or legend
. 请注意,对基础图形的后续“编辑”仅限于通过低级绘图命令(例如points
, lines
, text
, title
或legend
向当前绘图添加内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.