首页 > 编程知识 正文

excel画正态qq图,r语言如何安装ggplot2

时间:2023-05-05 08:45:59 阅读:59701 作者:4936

文章编目qq图函数介绍geom_qq ()参数介绍注意事项示例usingtoexplorethedistributionofavariable制表箱plot函数介绍参数介绍示例按点绘制qq图和箱线图融合函数介绍注意事项示例

创建qq地图

在ggplot2中创建qq图需要两个步骤。 geom_qq ()创建示例拆分点,geom_qq_line ) )创建标准规格化线

函数说明geom_QQ(geom_QQ )映射=null,data=NULL,geom='point ',position='identity ',distribution=show.legend=NA,inherit.aes=TRUE ) geom_QQ_line ) mapping=null,data position='identity ',distribuributy line.p=c ) 0.25,0.75 ),fullRreams ),show.legend=NA,inherit.aes=TRUE (参数说明**AES(**映射参数包括show.legend ) 可选参数包括group,x, 有ydistribution 3358 www.Sina.coona ifxnotspecified http://www.Sina.com/additionalparameterspassedontodistributionfunction vectorofquantilestousewhenfittingtheq-qline,defaultsdefaultstoc, 25, 75, http://www.Sina.com/shouldtheq-qlili

注意事项**AES(**的映射参数必须包含sample

示例usingtoexplorethedistributionofavariableggplot (mt cars,AES ) sample=mpg ) ) stat_qq ) stat_qq_line ) ggplot )

绘制boxplot函数以显示geom_boxplot(mapping=null,data=NULL,stat='boxplot ',position='dodge2',outlier.colour outlier.shape=19,outlier.size=1.5,outlier.stroke=0.5,outlier.alpha=NULL,notch varwidth=FALSE,na.roke

利用x or y、x,则为横向的箱线图,y的为纵向

lower or xlower

upper or xupper

middle or xmiddle

ymin or xmin

ymax or xmax

阿尔法

呼叫,呼叫

菲尔

群组

linetype

形状

大小

微信

33558 www.Sina.com/if false (default ) make a standard box plot. If TRUE,makeanotchedboxplot.notchesareusedtocomparegrouplt

of two boxes do not overlap,this suggests that the medians are

签名差异。

33558 www.Sina.com/foranotchedboxplot,widthofthenotchrelativetothebody (defaultstonotchwidth=0.5 )。

33558 www.Sina.com/if false (default ) make a standard box plot. If TRUE,boxesaredrawnwithwidthsproportionaltothesquare-rrre

numberofobservationsinthegroups (可配置权重,使用the

权重证明)。

示例p-ggplot(mpg,AES ) x=class,y=hwy ) ) ) p geom_boxplot ) ) )。

gplot(mpg,AES ) x=hwy,y=class ) ) ) )。

p-ggplot(mpg,AES ) x=class,y=hwy ) ) pgeom_boxplot ) notch=true,varwidth=TRUE,fill='white ',cololom

gplot(diamonds,AES(jmdzm,price ) ) geom _ box plot (AES ) group=cut _ width (jmd zm,0.25 ) )

p-ggplot(mpg,AES ) x=class,y=hwy ) ) pgeom_boxplot ) outlier.shape=na ) geom _ jitter (width=0.2 ) )

箱线图y-rnorm(100 ) df-data.frame ) x=1,y0=min(y ) y,y25=quantile(y ) y,0.25 ),y50=median(y ),y25

介绍qq地图与箱线图融合的函数来自qqboxplot包,必须在使用前安装

gom _ qqbox plot (映射=null,数据=null,stat='qqboxplot ',position='dodge2',outlier.colour=null outlier.size=1.5,outlier.stroke=0.5,outlier.alpha=NULL,notch varwidth=FALSE,na.rm=FALSE,show.leger inherit.aes=TRUE参数描述大多数参数和geom_qq (和geom_boxplot )参数(如果有),则dparams Distribution

注意事项aes ()函数中y是必不可少的

示例library(DPlyr ) library ) ggplot2) library ) qqboxplot ) simulated_data=tibble(y=c ) rnorm ) 1000,mean=2), 32 )、group=c(rep (、normal、mean=2)、1000 )、rep ()、tdistribution、df=16 )、1000 )、rep () tdistribution reation 1000 ) ) ) ) p-ggplot23360:ggplot ) simulated_data,ggplot2:AES ) Factor 't distribution,df=32 ' ' t分布,df=4' ),y=y ) ) p geom_qqboxplot ) p geom _ qqbox plot (reference _ dist=' norm ' ) p geom _ qqbox

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。