R 中的 scatter3D 与平面的着色问题
我正在使用 plot3D
库中的 scatter3D
并用预测平面绘制散点图:
library(plot3D)
scatter3D(x1,x2,y, bty = "g",
pch = 20, cex = 2, ticktype = "detailed",
surf = list(x = sort(unique(x1_new)), y = sort(unique(x2_new)), z = z.pred ,
facets = NA
))
但是,我的 y
范围从 -1 到 1 ,z.pred
中的一些预测低于 -1。因此,您会注意到低于 -1 的预测没有着色,因为它们超出了色标。我该如何解决这个问题?
I am using a scatter3D
from the library plot3D
and plotting a scatterplot with a plane of predictions:
library(plot3D)
scatter3D(x1,x2,y, bty = "g",
pch = 20, cex = 2, ticktype = "detailed",
surf = list(x = sort(unique(x1_new)), y = sort(unique(x2_new)), z = z.pred ,
facets = NA
))
my y
ranges from -1 to 1, however, some predictions in z.pred
are lower than -1. Hence you will notice that predictions below -1 are not coloured as they are outside the colour scale. How can I fix that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
Try this: