R语言base graphics: high level绘图函数

本文是R Graphics的笔记。R语言base graphics绘制图形的方式:首先使用high level绘图函数参数产生一个新的图形,然后使用low level绘图函数添加点、线、文字等其他图形元素。High level绘图函数有:

单变量high level绘图函数

FunctionDataDescription
plot()NumericScatterplot
plot()FactorBarplot
plot()1-D tableBarplot
barplot()Numeric (bar heights)Barplot
pie()NumericPie chart
dotchart()NumericDotplot
boxplot()NumericBoxplot
hist()NumericHistogram
stripchart()Numeric 1-Dscatterplot
stem()NumericStem-and-leaf plot

两个变量high level绘图函数

FunctionDataDescription
plot()Numeric, numericScatterplot
plot()Numeric, factorStripcharts
plot()Factor, numericBoxplots
plot()Factor, factorSpineplot
plot()2-D tableMosaic plot
sunflowerplot()Numeric, numericSunower scatterplot
smoothScatter()Numeric, numericSmooth scatterplot
boxplot()List of numericBoxplots
barplot()MatrixStacked/side-by-side barplot
dotchart()MatrixDotplot
stripchart()List of numericStripcharts
spineplot()Numeric, factorSpinogram
cdplot()Numeric, factorConditional density plot
fourfoldplot()2x2 tableFourfold display
assocplot()2-D tableAssociation plot
mosaicplot()2-D tableMosaic plot

多变量high level绘图函数

FunctionDataDescription
plot()`Data frameScatterplot matrix
pairs()MatrixScatterplot matrix
matplot()MatrixScatterplot
stars()MatrixStar plots
image()Numeric,numeric,numericImage plot
contour()Numeric,numeric,numericContour plot
filled.contour()Numeric,numeric,numericFilled contour
persp()Numeric,numeric,numeric3-D surface
symbols()Numeric,numeric,numericSymbol scatterplot
coplot()FormulaConditioning plot
mosaicplot()N-D tableMosaic plot

特定图形绘图函数 Specialized plots

  • plot()是泛函数,根据传入的对象选择对应的plot函数。
  • qqplot()qqnorm()
  • curve() 函数
plot(function(x) {sin(x)/x},
     from=-10*pi, to=10*pi,
     xlab="", ylab="", n=500)

# 等价于
curve(sin(x)/x, -10*pi, 10*pi)
  • 特定package中的plot的函数,专业领域的绘图
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值