11

每次我使用 pch=21 用格子在 R 中绘图时,我的绘图通常在 R 绘图窗口和 pdf 中绘图(带边框的圆圈);但是,当我在 Adob​​e Illustrator 或 Inkscape 中打开保存的 pdf 版本的绘图时,这些点奇怪地转换为“q”。谁能解释一下?这很令人沮丧,因为我想在 Illustrator 或 Inkscape 中编辑我的情节。

在此处输入图像描述

4

2 回答 2

16

我想你可能想使用:

 useDingbats = FALSE 

如:

pdf("myplot.pdf", useDingbats=FALSE)
plot()
dev.off()
于 2013-01-15T21:35:52.450 回答
9

?pdf拥有:

 On some systems the default plotting character ‘pch = 1’ is
 displayed in some PDF viewers incorrectly as a ‘"q"’ character.
 (These seem to be viewers based on the ‘poppler’ PDF rendering
 library).  This may be due to incorrect or incomplete mapping of
 font names to those used by the system.  Adding the following
 lines to ‘~/.fonts.conf’ or ‘/etc/fonts/local.conf’ may circumvent
 this problem.

 <fontconfig>    
 <alias binding="same">
   <family>ZapfDingbats</family>
   <accept><family>Dingbats</family></accept>
 </alias>
 </fontconfig>  

 Some further workarounds for problems with symbol fonts on viewers
 using ‘fontconfig’ are given in the ‘Cairo Fonts’ section of the
 help for ‘X11’.

该 fontconfig 声明过去(现在仍然)在我的 Linux 机器上对我有用。我建议您设置它或阅读最后引用的句子中指示的其他页面,看看这些是否解决了您所看到的问题。

于 2013-01-15T21:55:55.373 回答