編輯以提供更多代碼和可運行示例。persp3d - 不旋轉的主標題?
如果我用下面的代碼打開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")
然後我得到的情節標題,但不幸的是標題與鼠標操作四處移動。
有誰知道如何讓標題文本「總點數」固定在窗口頂部,使其不移動?另外,如果有一種方法可以將軸文本與具有數字的軸相關聯,那麼它可能更具可讀性。
謝謝
您想要一個標題在曲線圍繞z軸旋轉90度時消失? –
-1使這種可重複性,我會給你點回來。使用包中的示例數據或在代碼中生成示例。 – Spacedman