-1

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

如果我使用以下代码打开 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")

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

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

谢谢

4

1 回答 1

0

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

请注意,此 Q 与 SO 上的另一个问题重复。

于 2013-08-26T11:07:11.513 回答