R 多对数图
我正在尝试制作表格的图表并将其绘制在日志空间中。
首先, plot(dat)
为我提供了图形网格
其次, plot(dat, log="xy")
为我提供了正确的数据图log space
的主对角线标签
但是, plot(dat, log="xy")
破坏了 names(dat)
R 版本 2.11.0
示例数据
cold cold_control drought_1 drought_2 drought_control_1 drought_control_2 pollen
locusA 1.586772 2.681969 2.158070 0.565037 3.012266 3.673228 0.000000
locusB 0.000000 0.000000 0.063385 0.000000 0.000000 0.000000 0.000000
locusC 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.049587
locusD 66.811446 142.196072 74.329916 35.878431 106.071526 150.266891 0.000000
locusE 10.310947 6.489778 20.680820 31.699902 19.353401 21.345744 0.033246
locusF 26.928376 11.339193 21.226212 24.858953 10.085712 15.587217 0.412588
:另外,我得到这些带有 log="xy"
的警告
1:在 xy.coords(x, y, xlabel, ylabel, log) 中:省略 2 个 x 值 <= 0 从对数图
2:在 xy.coords(x, y, xlabel, ylabel, log) 中:省略 2 个 y 值 <= 0 从对数图
3:在 xy.coords(x, y, xlabel, ylabel, log) 中:省略 2 个 x 值 <= 0 从对数图
4:在 xy.coords(x, y, xlabel, ylabel, log) 中:省略 2 个 y 值 <= 0 从对数图
5:在轴(side = side,at = at,labels = labels,...)中:“log”是 不是图形参数
6:在plot.xy(xy.coords(x, y), type = type, ...)中:“log”不是 图形参数
I am trying to make a graph of a table and graph it in log space.
First of all, plot(dat)
gives me the grid of graphs
Second of all, plot(dat, log="xy")
gives me the correct plots of data in log space
However, plot(dat, log="xy")
ruins the main diagonal's labels of names(dat)
R version 2.11.0
Sample Data:
cold cold_control drought_1 drought_2 drought_control_1 drought_control_2 pollen
locusA 1.586772 2.681969 2.158070 0.565037 3.012266 3.673228 0.000000
locusB 0.000000 0.000000 0.063385 0.000000 0.000000 0.000000 0.000000
locusC 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.049587
locusD 66.811446 142.196072 74.329916 35.878431 106.071526 150.266891 0.000000
locusE 10.310947 6.489778 20.680820 31.699902 19.353401 21.345744 0.033246
locusF 26.928376 11.339193 21.226212 24.858953 10.085712 15.587217 0.412588
Also, I get these warnings with log="xy"
1: In xy.coords(x, y, xlabel, ylabel, log) : 2 x values <= 0 omitted
from logarithmic plot2: In xy.coords(x, y, xlabel, ylabel, log) : 2 y values <= 0 omitted
from logarithmic plot3: In xy.coords(x, y, xlabel, ylabel, log) : 2 x values <= 0 omitted
from logarithmic plot4: In xy.coords(x, y, xlabel, ylabel, log) : 2 y values <= 0 omitted
from logarithmic plot5: In axis(side = side, at = at, labels = labels, ...) : "log" is
not a graphical parameter6: In plot.xy(xy.coords(x, y), type = type, ...) : "log" is not a
graphical parameter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用xlog=TRUE, ylog=TRUE
,而不是log="xy"
。名称将显示,日志不是图形参数警告将消失。无论如何,您有一些 0 值,并且无法绘制
log(0)
,这就是其他警告的原因You should usexlog=TRUE, ylog=TRUE
, instead oflog="xy"
. The names will show up and the log is not a graphical parameter warnings will disappear.Anyway you have some 0 values, and you cannot plot
log(0)
, that's the reason of the other warnings