2

我正在尝试highcharter在 jupyterlab 中渲染一些图表

data(diamonds, economics_long, mpg, package = "ggplot2")
library(dplyr)
library(highcharter)
hchart(mpg, "scatter", hcaes(x = displ, y = hwy, group = class))

要开始plotlywrapper工作,您需要安装扩展程序。我可以想象必须建造类似的东西highcharter

错误信息:

HTML widgets cannot be represented in plain text (need html)
4

1 回答 1

0

https://blog.ouseful.info/2018/04/26/r-htmlwidgets-in-jupyter-notebooks/

data(diamonds, economics_long, mpg, package = "ggplot2")
library(dplyr)
library(highcharter)
x=hchart(mpg, "scatter", hcaes(x = displ, y = hwy, group = class)) %>%
hc_size(width=800, height = 400)
saveWidget(x, 'demox.html', selfcontained = FALSE)
display_html('<iframe src="demox.html", width = 900, height = 500 ></iframe>')
于 2018-04-30T10:35:41.067 回答