[英]R frequency table plot y-axis logarithm scale
繪制頻率表時是否有諸如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
謝謝!
也許您想做這樣的事情:
plot(as.numeric(names(freq)),as.numeric(freq),log='y',xlab='',ylab='freq')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.