Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R ggsave不约束线宽_R_Ggplot2 - Fatal编程技术网

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)。所以,这是行不通的。