R语言绘图--交互图

条形图:

使用R包: rCharts

R语言绘图--交互图

R语言绘图--交互图

R语言绘图--交互图

饼图:

R包:rCharts

x <- data.frame(key = c("a", "b", "c"), value = c(1, 2, 3))

hPlot(x = "key", y = "value", data = x, type = "pie") 

R语言绘图--交互图

热图:

R包:d3heatmap

library(d3heatmap)

 d3heatmap(mtcars, dendrogram = "none", scale = "column", colors = "Spectral")

R语言绘图--交互图

散点图:

R包:scatterD3

library(scatterD3)

scatterD3(data=mtcars, x=wt,y=mpg,xlab="Weight",ylab="Mpg")

R语言绘图--交互图

R语言绘图--交互图

保存成HTML

R包:htmlwidgets

library(d3heatmap)

out<-d3heatmap(mtcars,colors = cm.colors(7))

library(htmlwidgets)

saveWidget(widget=out, file="D:/R/m2.html")