persp3d - 不旋转的主标题?

时间:2013-08-25 23:22:59

标签: r plot rgl

编辑以提供更多代码和可运行的示例。

如果我使用以下代码打开3D图:

library(rgl)

GainTargets = seq(from=1, to=12, by=1)
PredBarTargets = seq(from=3, to=16, by=1)

data=structure(c(1176.18, 1379.34, 1280.67, 1149.02, 1034.01, 1028.74, 
             944.06, 807.54, 715.39, 691.08, 679.14, 644.02, 642.98, 577.61, 
             1004.22, 1238.13, 1216.16, 1104.92, 1032.46, 1038.11, 919.98, 
             855.47, 706.54, 668.51, 665.67, 689.57, 686, 623.82, 729.61, 
             1127.32, 1137.55, 1084.25, 955.15, 1005.86, 955.6, 881.66, 839.93, 
             767.45, 731.49, 727.19, 696.45, 634.52, 377.81, 917.08, 1087.57, 
             1036.17, 920.88, 993.75, 964.35, 848.94, 874.95, 780.58, 725.08, 
             695.12, 709.32, 663.93, 227, 787.53, 949.31, 972.59, 950.3, 946.22, 
             876.33, 881.49, 827.44, 767.66, 755.26, 731.71, 744.37, 692.86, 
             32.65, 404.91, 514.82, 652.8, 697.77, 859.85, 808.12, 794.15, 
             746.61, 719.72, 709.59, 662.36, 695.06, 687.76, 0, 262.09, 347.17, 
             442.35, 453.76, 684.06, 638.13, 664.69, 721.68, 688.32, 653.87, 
             665.21, 680.52, 685.13, 0, 38.77, 264.4, 432.8, 408.33, 457.38, 
             474.23, 453.76, 570.74, 591.96, 593.7, 636.75, 585.43, 577.72, 
             0, 0, 92.65, 255.08, 388.66, 432.73, 418.19, 425.02, 436.3, 452.17, 
             489.17, 499.27, 500.93, 495.26, 0, 0, 0, 90.28, 309.44, 324.99, 
             357.05, 376.11, 412.2, 337.4, 338.54, 370.11, 389.95, 501.99, 
             0, 0, 0, 0, 106.55, 190.84, 216.41, 322.11, 337.05, 313.99, 325.03, 
             356.98, 381.47, 373.77, 0, 0, 0, 0, 0, 198.84, 120.76, 204.33, 
             146.22, 289.93, 284.82, 337.22, 347.41, 337.29), .Dim = c(14L, 
                                                                       12L))

Points<-as.matrix(data)

open3d()
persp3d(x=PredBarTargets, y=GainTargets, z=Points, 
     col="green3", main="Total Points")

然后我在剧情上得到一个标题,但不幸的是标题随着鼠标动作而移动。

是否有人知道如何将标题文本“总分数”固定在窗口顶部以使其不移动?此外,如果有一种方法可以将轴文本与其上包含数字的轴相关联,那么这可能更具可读性。

由于

1 个答案:

答案 0 :(得分:0)

目前无法在rgl中完成此操作。您只能将文本放在3d坐标中,并使其与绘图一起旋转。为什么不联系rgl的维护者并将其放在功能请求列表中。

请注意,此问题与SO上的其他问题重复。