
绘图
u010380670
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
高级绘图函数
函数描述plot(x)x元素值为纵坐标plot(x,y)sunflowerplot(x,y)花瓣数为点个数pie(x)饼图boxplot(x)箱型图dotchart(x)mosaicplot(x)马赛克图pairs(x)散点图矩阵hist(x)直方图barplot(x)条形图qqnorm(x)正态...原创 2018-12-12 20:24:20 · 718 阅读 · 0 评论 -
lattice绘图工具
library(lattice)data1 <- data.frame(x=seq(0,14),y=seq(3,17),z=rep(c("a","b","c"),times=5))xyplot(y~x,data = data1)show.settings()xyplot(y~x,groups = z,data = data1)myset原创 2018-12-15 12:57:11 · 1468 阅读 · 0 评论 -
ggplot2绘图工具
qplotqplot(Species,Sepal.Length,data = iris,geom = "boxplot",fill=Species, main = "根据种类分组的花萼长度")小提琴图qplot(Species,Sepal.Length,data=iris,geom=c("violin","jitter"),fill=Species,main = "小提琴图...原创 2018-12-15 14:47:03 · 693 阅读 · 1 评论 -
交互式绘图
library(rCharts)hair_eye_male <- subset(as.data.frame(HairEyeColor),Sex=="Male")hair_eye_male[,1] <- paste0("Hair",hair_eye_male[,1])hair_eye_male[,2] <- paste0("EYE",hair_eye_male[,2])nP...原创 2018-12-15 15:41:20 · 744 阅读 · 0 评论 -
recharts包
library(recharts)echartr(iris,Sepal.Length,Sepal.Width)echartr(iris,Sepal.Length,Sepal.Width,series = Species)#分组可以把修改用%>%串联起来echartr(iris,Sepal.Length,Sepal.Width,series = Species) %>...原创 2018-12-15 17:02:45 · 1000 阅读 · 0 评论 -
rbokeh包
带拟合线的散点图z <- lm(dist~speed,data = cars)p <- figure(width = 600,height = 600) %>% ly_points(cars,hover = cars) %>% ly_lines(lowess(cars),legend = "lowess") %>% ly_abline(z,type =...原创 2018-12-15 17:21:58 · 347 阅读 · 0 评论 -
plotly包
plot_ly(revenue,x=~游戏名称,y=~本周,type="bar",name="本周")plot_ly(revenue,x=~游戏名称,y=~本周,type="bar",name="本周")%>% add_trace(y=~上周,name="上周")layout(barmode='stack',xaxis=list(title=""),yaxis原创 2018-12-15 18:00:52 · 630 阅读 · 0 评论 -
交互式图形
library(leaflet)leaflet() %>% addTiles() %>% addMarkers(lng=112.768,lat=31.852,popup="8888")LTV <- read.csv("LTV.csv")LTV.ts <- ts(LTV)dygraph(LTV.ts,main="LTV forecast") %>% ...原创 2018-12-16 10:13:07 · 839 阅读 · 0 评论 -
逐条输入构建图形元素
颜色参数描述col默认绘图颜色fg图形前景颜色bg图形背景颜色col.axis坐标轴刻度文字颜色col.lab坐标轴标签颜色col.main标题颜色col.sub副标题颜色plot(women,main="身高VS体重散点图",sub="数据来源:women数据集",col="red",col.main="green",...原创 2018-12-10 17:13:09 · 165 阅读 · 0 评论