R 多对数图

发布于 2024-09-03 23:56:14 字数 1490 浏览 1 评论 0原文

我正在尝试制作表格的图表并将其绘制在日志空间中。

首先, 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 plot

2: In xy.coords(x, y, xlabel, ylabel, log) : 2 y values <= 0 omitted
from logarithmic plot

3: In xy.coords(x, y, xlabel, ylabel, log) : 2 x values <= 0 omitted
from logarithmic plot

4: In xy.coords(x, y, xlabel, ylabel, log) : 2 y values <= 0 omitted
from logarithmic plot

5: In axis(side = side, at = at, labels = labels, ...) : "log" is
not a graphical parameter

6: In plot.xy(xy.coords(x, y), type = type, ...) : "log" is not a
graphical parameter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

本王不退位尔等都是臣 2024-09-10 23:56:14

您应该使用xlog=TRUE, ylog=TRUE,而不是log="xy"。名称将显示,日志不是图形参数警告将消失。

无论如何,您有一些 0 值,并且无法绘制 log(0) ,这就是其他警告的原因

You should use xlog=TRUE, ylog=TRUE, instead of log="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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文