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

可以使用low level的图形函数添加点、线、图形、图像和文字。这些添加的元素落在plot region区域,受clip区域的控制。

基本的图像函数有:

FunctionDescription
points()Draw data symbols at locations (x, y)
lines()Draw lines between locations (x, y)
segments()Draw line segments between (x0, y0) and (x1, y1)
arrows()Draw line segments with arrowheads at the end(s)
xspline()Draw a smooth curve relative to control points (x, y)
rect()Draw rectangles with bottom-left corner at (xl, yb) and top-right corner at (xr, yt)
polygon()Draw one or more polygons with vertices (x, y)
polypath()Draw a single polygon made up of one or more paths with vertices (x, y)
rasterImage()Draw a bitmap image
text()Draw text at locations (x, y)

此外:

FunctionDescription
mtext()在margin区域输出文字。 title()函数是特殊的mtext函数。
box()绘制plot region的边框
legend()绘制legend。 需要显式指定。 ggplot2可以自动生成legend
axis()绘制自定义的坐标轴

坐标系说明

NameDescription
“user”The scales on the plot axes
“inches”Inches, with (0, 0) at bottom-left
“device”Pixels for screen or bitmap output, otherwise 1=72in.
“ndc”Normalized coordinates, with (0, 0) at bottom-left and (1, 1) at top-right, within the entire device
“nic”Normalized coordinates within the inner region
“nfc”Normalized coordinates within the gure region
“npc”Normalized coordinates within the plot region
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值