【发布时间】:2018-12-12 15:32:13
【问题描述】:
我阅读了教程https://github.com/plotly/orca#installation 并在 docker 镜像中运行命令:
apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && \
apt-get install -y nodejs libgconf-2-4 libgtk2.0-0 && \
npm install -g electron@1.8.4 orca --unsafe-perm=true --allow-root
操作系统详情:
root@8a17254aeb9a:/# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.6 (stretch)
Release: 9.6
Codename: stretch
但是当我执行时没有任何反应:
root@8a17254aeb9a:/# which orca
/usr/bin/orca
root@8a17254aeb9a:/# orca
root@8a17254aeb9a:/# orca --help
root@8a17254aeb9a:/# electron
root@8a17254aeb9a:/# electron -v
当我执行示例 R 代码时出现错误:
> library(plotly)
> p <- plot_ly(z = ~volcano) %>% add_surface()
> orca(p, "surface-plot.svg")
Error: No mapbox access token found. Obtain a token here
https://www.mapbox.com/help/create-api-access-token/
Once you have a token, assign it to an environment variable
named 'MAPBOX_TOKEN', for example,
Sys.setenv('MAPBOX_TOKEN' = 'secret token')
我阅读了很多教程和问题,但仍然没有答案。你能帮忙吗?
【问题讨论】:
-
您在代码中的什么位置设置了 mapbox 访问令牌?
-
无处可去。我真的需要一些令牌来从情节中生成简单的图像吗?
-
它就是这么告诉你的。
-
但为什么
orca --help没有像 github 示例那样打印任何内容?
标签: r docker electron r-plotly orca