R ggsave不约束线宽
我有下面的例子R ggsave不约束线宽,r,ggplot2,R,Ggplot2,我有下面的例子 library(ggplot2) library(ggthemes) ggplot(mtcars) + geom_point(aes(x = wt, y = mpg, colour=factor(gear))) + facet_wrap(~am) + ggtitle("Title") + theme( axis.line.x = element_line(colour = "black", size = 0.5, linetype = "solid")
library(ggplot2)
library(ggthemes)
ggplot(mtcars) +
geom_point(aes(x = wt, y = mpg, colour=factor(gear))) +
facet_wrap(~am) +
ggtitle("Title") +
theme(
axis.line.x = element_line(colour = "black", size = 0.5, linetype = "solid"),
axis.line.y = element_line(colour = "black", size = 0.5, linetype = "solid")
)
ggsave(filename = "~/Desktop/test.pdf")
在元素_line()
函数的文档中,未指定大小属性的单位。但当我在Illustrator中打开生成的pdf时,轴线显示为1.07 pt线
所以。。。size
属性的单位是什么?如何实现输出的线宽为0.5 pt
谢谢,换算系数是(72.27/25.4)*(72.27/96)=2.141959。因此,正如您所注意到的,size=0.5
会产生一条1.07磅宽的线。有关详细信息,请参阅。您看过这个吗?不是特别的,但我已经有了一个想法,它可能是点和mm之间的转换。该系数为0.35或2.83,具体取决于转换方向。但这里的系数是2.14(R->AI)或0.47(AI->R)。所以,这是行不通的。