R:绘图轴上没有数字
非常基本的问题,考虑到代码:R:绘图轴上没有数字,r,plot,graph,label,R,Plot,Graph,Label,非常基本的问题,考虑到代码: f_chi_squared <- function(x, r) { return ( (x^(r/2 - 1) * exp(1)^(-x/2)) / ( gamma(0.5*r) * 2^(r/2) ) ) } this_chi_squared <- function(x) { return (f_chi_squared(x, 2)) } plot(this_chi_squared) 看来你的利润太小了。在绘图之前使用以下代码: par(
f_chi_squared <- function(x, r) {
return ( (x^(r/2 - 1) * exp(1)^(-x/2)) / ( gamma(0.5*r) * 2^(r/2) ) )
}
this_chi_squared <- function(x) {
return (f_chi_squared(x, 2))
}
plot(this_chi_squared)
看来你的利润太小了。在
绘图之前使用以下代码:
par(mar = c(5,5,3,1))
可能您无意中运行了一些覆盖默认设备选项的代码。尝试运行dev.off()
重置设备。如果不起作用,重新启动RAlsoxlab
和ylab
不起作用show@Gregor谢谢,但我得到了这个新的错误(添加到问题中)您在重新启动R???@Gregor时得到了这个错误我使代码更具可复制性,当我使用添加的dev.off()运行代码时出现了这个错误
par(mar = c(5,5,3,1))