R pch plotting in illustator as “q”

痞子三分冷 提交于 2021-02-06 16:29:04

问题


Every time I use pch=21 for plotting in R with lattice, my plot plots normally in the R plotting window and in pdf (circles with borders); however when I open a saved pdf version of my plot in Adobe Illustrator or Inkscape, the dots are oddly converted to "q"'s. Can anyone explain this? It's pretty frustrating, as I would like to edit my plot in either Illustrator or Inkscape.

enter image description here


回答1:


I think you might want to use:

 useDingbats = FALSE 

as in:

pdf("myplot.pdf", useDingbats=FALSE)
plot()
dev.off()



回答2:


?pdf has:

 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’.

That fontconfig declaration has worked for me in the past (and still does) on my Linux boxes. I suggest you set that or read the other pages indicated in the last of the quoted sentences and see if those fix the problem you are seeing.



来源:https://stackoverflow.com/questions/14347362/r-pch-plotting-in-illustator-as-q

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!