Вы можете сделать это с помощью scatterplot3d (среди прочего):
library(scatterplot3d)
#first draw the lines of the triangle
#using type="l" Since we are drawing a
#shape, include the first point twice to
#close the polygon
q <- scatterplot3d(c(50, 0, 0, 50),
c(0, 59, 0, 0), c(0, 0, 20, 0),
xlim=c(0, 60), ylim=c(0, 60), zlim=c(0, 60), type="l",
xlab="CPU Usage", ylab="Power Consumption", zlab="Bandwidth",
box=FALSE)
#now add the points. scatterplot3d creates a list,
#one element of which is a function that operates
#on the existing chart, q, adding points:
q$points3d(c(50, 0, 0), c(0, 59, 0), c(0, 0, 20))
Конечно, если вам нужно выполнить более одного из них, вы можете извлечь точки из своих данных вместо жесткого кодированияих.Я думал, что жесткое кодирование сделает это немного более читабельным.