条形图:
使用R包: rCharts
饼图:
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包:d3heatmap
library(d3heatmap)
d3heatmap(mtcars, dendrogram = "none", scale = "column", colors = "Spectral")
散点图:
R包:scatterD3
library(scatterD3)
scatterD3(data=mtcars, x=wt,y=mpg,xlab="Weight",ylab="Mpg")
保存成HTML
R包:htmlwidgets
library(d3heatmap)
out<-d3heatmap(mtcars,colors = cm.colors(7))
library(htmlwidgets)
saveWidget(widget=out, file="D:/R/m2.html")
|
请发表评论