r - 将图例添加到 ordirgl {vegan3d}
问题描述
我正在尝试将图例添加到使用 vegan3d 包生成的ordirgl()
图形中。我已经成功地使用plot3d()
和legend3d()
在rgl包中做到了这一点。不过,我更喜欢vegan3d中提供的一些功能,因为我正在处理排序,如果我能够制作传奇,我更愿意使用它。
使用rgl包:
data("dune.env")
data("dune")
sol <- metaMDS(dune, k = 3)
par3d(windowRect = c(100, 100, 612, 612))
with(sol, plot3d(points[,1], points[,2], points[,3], type = "s", col = rainbow(3)[as.numeric(dune.env$Use)]))
legend3d("topright", legend = unique(dune.env$Use), pch = 16, col = rainbow(3), inset = c(0.03))
是否可以为此添加图例?
ordirgl(sol, size = 4, col = rainbow(3)[as.numeric(dune.env$Use)])
orglspider(sol, dune.env$Use, col = rainbow(3), scaling = "sites")
orglellipse(sol, dune.env$Use, col = rainbow(3), kind = "se", conf = .95, scaling = "sites")
谢谢您的帮助!
解决方案
推荐阅读
- javascript - 在动画中重复内容阅读更多/更少
- javascript - 在 Typescript 中使用 Ant Design 的轮播下一个和上一个窗格方法?
- javascript - GraphQL query structure
- delphi - GDI+ drawing on a TBitmap
- ios - Displaying Push Notification Badges Without Notification Service Extension
- html - How to display a HTML page in a PowerShell dialog?
- html - Apply bootstrap class to all child anchors in angular component
- python - 为内存中的 SQLite 提供数据的应用程序的架构问题
- sublimetext3 - Sublime Text 不允许我保存文件
- javascript - node.js/discord.js:TypeError:无法读取 null 的属性“setPresence”