2
A
回答
7
下面是一些开始使用图形的基础。让它更漂亮留给读者。你可以在这里看到一个例子:http://www.math.csi.cuny.edu/gw/ex-dashboard.R。
dashboard <- function(dial=list(
list(color="red",
range=c(10, 40)),
list(color="yellow",
range=c(40, 60)),
list(color="green",
range=c(70, 100))
),
value=from) {
from <- min(unlist(lapply(dial, "[[", i="range")))
to <- max(unlist(lapply(dial, "[[", i="range")))
theta <- seq(-pi/3, pi + pi/3, length=100)
r <- 1
scale <- function(x) {
m <- (pi + pi/3 - (-pi/3))/(from - to)
(pi + pi/3) + m*(x - from)
}
plot.new()
plot.window(xlim=c(-1, 1), ylim=c(sin(-pi/3), 1))
lines(cos(theta), sin(theta))
sapply(dial, function(l) {
d <- scale(l$range)
x <- seq(d[1], d[2], length=100)
lines(cos(x), sin(x), col=l$color, lwd=3)
})
ticks <- pretty(c(from, to), n=5)
ticks_th <- scale(ticks)
r <- 1 - .15
text(r*cos(ticks_th), r*sin(ticks_th), labels=ticks)
sapply(ticks_th, function(th) {
lines(cos(th)*c(1,.95), sin(th)*c(1, .95))
})
r <- 1 - .25
th <- scale(value)
arrows(0, 0, cos(th), sin(th))
}
dashboard(value=60)
2
5
你可以做极坐标图类似:
require(plotrix)
polar.plot(c(0,20),c(0,60),main="Dashboard",lwd=3,line.col=4)
您可以深入挖掘的代码,如果你想自定义外观。使用radial.plot
可能会给你更多的自定义。
相关问题
- 1. Mobikwik仪表板仪表板
- 2. R中的交互式Web仪表板
- 3. Tableau仪表板操作的R复制
- 4. R与ggplot2中的信息仪表板
- 5. 在R闪亮的仪表板中对齐框的中心()(R)
- 6. Wordpress仪表板
- 7. Excel仪表板
- 8. Swing仪表板
- 9. admob仪表板
- 10. Grafana摘要仪表板接收数据但每个服务仪表板不
- 11. 部署在Kubernetes仪表板
- 12. 仪表板在jasperserver 4.5
- 13. 拨号/仪表GTK小部件
- 14. Log4Net的仪表板
- 15. 仪表板设置
- 16. WordPress的仪表板
- 17. 自举仪表板
- 18. CCNet仪表板空
- 19. 仪表板到StackPanel
- 20. ReactJs AdminLTE仪表板
- 21. 实时仪表板
- 22. 拆下仪表板
- 23. 构建仪表板
- 24. daching仪表板的Api键
- 25. GoodData导出仪表板API
- 26. CRM仪表板列表图
- 27. OBIEE 12.2.1.2 - 仪表板自定义 - 仪表板属性
- 28. Docker注册表仪表板
- 29. 使用WSO2 BAM创建仪表板已定义的仪表板
- 30. 仪表板成功登录后Zabbix仪表板出错
您是否在寻找能够立即为您提供此功能的产品,或者您是否愿意投入一些工作? – Dason
也许这两个,如果我有一些东西开始工作,但如果有办法做得更快,我会很感激。 – Maciej