数据更多探索

3D散布图

> library(scatterplot3d)
Warning message:
程辑包‘scatterplot3d’是用R版本3.3.3 来建造的 
> scatterplot3d(iris$Sepal.Width,iris$Sepal.Length,iris$Petal.Width)

交互式


> plot3d(iris$Petal.Width,iris$Sepal.Length,iris$Sepal.Width)

数据矩阵展示的2D热图区

> distMatrix <- as.matrix(dist(iris[,1:4]))
> heatmap(distMatrix)

等级图

> library(lattice)
Warning message:
程辑包‘lattice’是用R版本3.3.3 来建造的
> levelplot(Petal.Width~Sepal.Length*Sepal.Width,iris,cuts = 9, col.regions = grey.colors(10)[10:1])



等高图

> filled.contour(volcano,color = terrain.colors, asp = 1, plot.axes = contour(volcano, add = T ) )

数据矩阵的另一种图像展示是3D曲面图

> persp(volcano,theta = 25, phi = 30, expand = 0.5, col = "lightblue")

平行坐标为多维数据提供了良好的可视化效果

> parcoord(iris[1:4], col = iris$Species)

ggplot2包中支持复杂的图像,对探索数据非常重要。

将图标保存到文件中

> # save as a PDF file
> pdf("myPlot.pdf")
> x <- 1:50
> plot(x, log(x))
> graphics.off()





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值