【问题标题】:R frequency table plot y-axis logarithm scaleR 频率表图 y 轴对数刻度
【发布时间】:2013-08-10 17:05:58
【问题描述】:

绘制频率表时是否有log='y'之类的选项。我的代码如下:

df = read.table(myfile, header=F, sep=',')
freq = table(df[[1]]) # make frequency table for the first column
plot(freq, log='y')

但是它不能显示对数。错误信息是:

Warning messages:
1: In plot.window(...) :
  nonfinite axis limits [GScale(-inf,7.0814,2, .); log=1]
2: In axis(...) : "log" is not a graphical parameter

谢谢!

【问题讨论】:

    标签: r plot scale frequency logarithm


    【解决方案1】:

    也许你想做这样的事情:

    plot(as.numeric(names(freq)),as.numeric(freq),log='y',xlab='',ylab='freq')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-13
      • 1970-01-01
      • 1970-01-01
      • 2011-05-08
      • 2023-04-03
      • 1970-01-01
      • 2014-01-08
      • 1970-01-01
      相关资源
      最近更新 更多