ggplot2为我们提供了绘制出版级的绘图的平台。出版级绘图要求高,比如很多期刊就要求图片中的线条粗细不能小雨0.5pt,同时不能大于1.5pt.
但是ggplot2中的linewidth(新版本) 或者 size函数(老版本)中的1单位(size units)究竟等于word或者说adobe中的多少磅呢?
这个网上很少有资料设计。
这里提供一个换算:
一、源代码
ggplot2/geom-.r at b05c6c1f61a52311809ffda775eb258b07518dab · tidyverse/ggplot2 · GitHub
pt = 72.27 / 25.4 = 2.845276 mm
stroke = 96 / 25.4 = 3.779528 mm
二、包中对单位的描述
graphical-units {ggplot2} | R Documentation |
Graphical units
Description
Multiply size in mm by these constants in order to convert to the units that grid uses internally for lwd
and fontsize
.
Usage
.pt
.stroke