ggplot2学习心得之qplot
来源:互联网 发布:星际争霸人类 知乎 编辑:程序博客网 时间:2024/06/06 16:49
qplot(x,y,)绘制散点图
qplot()#将变量函数作为参数
colour=color #添加颜色渐变
sharp=cut 添加切工
alpha=I(1/10)##表示10次重叠后不透明
alpha=I(1/100)##表示100次重叠后不透明
alpha=I(1/200)##表示200次重叠后不透明
geom=c("point","smooth")##point表示散点图,smooth表示平滑线
geom=c("point","smooth")##point表示散点图,smooth表示平滑线
geom=c("point","smooth"),span=0.2)##平滑线是否平滑
geom=c("point","smooth"),span=1)##平滑线是否平滑
library(mgcv)
method="gam",fomula=y~s(x))##扩展拟合线
method="gam",fomula=y~s(x,bs="cs"))##扩展拟合线,大数据
library(splines)##包含自然样条:y~ns(x,2),第二个参数随意调
geom=c("point","smooth"),method="lm")
geom=c("point","smooth"),method="lm",fomula = y~ns(x,5))
geom="jitter",alpha=I(1/5))##躁动点图
geom="jitter",alpha=I(1/50))##躁动点图
geom="jitter",alpha=I(1/200))##躁动点图
geom="histogram")#直方图
geom="density")#密度曲线图
geom="histogram",fill=color)#直方图带色
geom="density",colour=color)#密度曲线图带色
geom="histogram",binwidth=0.1,xlim=c(0,3))#直方图 binwidth调节宽度
geom="bar")##条形图,分组计数
qplot()#将变量函数作为参数
colour=color #添加颜色渐变
sharp=cut 添加切工
alpha=I(1/10)##表示10次重叠后不透明
alpha=I(1/100)##表示100次重叠后不透明
alpha=I(1/200)##表示200次重叠后不透明
geom=c("point","smooth")##point表示散点图,smooth表示平滑线
geom=c("point","smooth")##point表示散点图,smooth表示平滑线
geom=c("point","smooth"),span=0.2)##平滑线是否平滑
geom=c("point","smooth"),span=1)##平滑线是否平滑
library(mgcv)
method="gam",fomula=y~s(x))##扩展拟合线
method="gam",fomula=y~s(x,bs="cs"))##扩展拟合线,大数据
library(splines)##包含自然样条:y~ns(x,2),第二个参数随意调
geom=c("point","smooth"),method="lm")
geom=c("point","smooth"),method="lm",fomula = y~ns(x,5))
geom="jitter",alpha=I(1/5))##躁动点图
geom="jitter",alpha=I(1/50))##躁动点图
geom="jitter",alpha=I(1/200))##躁动点图
geom="histogram")#直方图
geom="density")#密度曲线图
geom="histogram",fill=color)#直方图带色
geom="density",colour=color)#密度曲线图带色
geom="histogram",binwidth=0.1,xlim=c(0,3))#直方图 binwidth调节宽度
geom="bar")##条形图,分组计数
geom="bar",weight=carat+scale_y_continuous("carat")##条形图,weight=carat加权,每种颜色的价格总质量
qplot(date,uempmed,data=economics,geom="line")## 绘制时间序列
0 0
- ggplot2学习心得之qplot
- R ggplot2之qplot
- ggplot2学习笔记之qplot
- R可视化绘图一ggplot2之qplot
- ggplot2系列:散点图qplot()
- qplot\ggplot2 绘制箱型图、散点图
- ggplot2中qplot的用法
- ggplot2作图详解1:入门函数qplot
- ggplot2学习入门第二章qplot入门
- ggplot2作图详解:入门函数qplot
- R读xlsx文件与ggplot2 qplot总结
- R语言数据可视化:ggplot2中的qplot()函数
- qplot
- ggplot2
- ggplot2
- ggplot2
- ggplot2
- R画图之ggplot2-->柱状图
- android 中 EditText加入图标 更改边框颜色 设置透明 代码
- 快速理解Kafka分布式消息队列框架
- MySQL查询优化的5个好用方法
- android canvas void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint)
- 什么叫做上网?htpp协议又是什么?网站工作的原理?
- ggplot2学习心得之qplot
- 经纬财富:汉中今日非农多空巅峰对决
- 小谈边界问题
- shell 中getopts的简单解述
- 二叉树相关操作(最全前中后遍历 等)
- 网站开发日记(14)-MYSQL子查询和嵌套查询优化
- 你真的会python嘛?
- 九度题目1447:最短路
- 网站开发-php开发手机论坛(2)-http协议以及网络原理