R postscript EPS缺少字体系列

时间:2015-12-07 16:58:27

标签: fonts igraph postscript eps

当我尝试将我的网络图作为eps文件导出时,我遇到了字体问题。我检查了一些解决方案,但他们并没有解决我的问题。对此有什么建议吗? 谢谢, 网络脚本:

library(igraph)
rt.g=graph.adjacency(m,mode="undirected",weighted=TRUE,diag=FALSE)
# node size
node <-c(13643,736,68865,21928,90238,195057,98361,1124,28500,93839,3851,3077,202112,61550,91769,63042)
normalized <- function(x){log((x-min(x)/(max(x)-min(x))))}
node.size <- normalized(node)
#edge color
E(rt.g)[E(rt.g)$weight > 0.012]$color <- "green"
E(rt.g)[E(rt.g)$weight > 0.05]$color <- "yellow"
E(rt.g)[E(rt.g)$weight > 0.12]$color <- "blue"
E(rt.g)[E(rt.g)$weight > 0.20]$color <- "red"
V(rt.g)$color <- "white"
l <-layout.fruchterman.reingold(rt.g)
V(rt.g)$label.cex <- 0.5
setEPS(horizontal=FALSE, onefile=FALSE,paper="special",height=10,width=10,fonts="serif")
postscript("Desktop/TEP/test.eps")
plot.igraph(rt.g,layout=l,edge.width=E(rt.g)$weight*20,edge.curved=TRUE,vertex.size=node.size*3,
            vertex.label.color="black",vertex.label.family="serif")
title("RETWEET NETWORK USER TRANSITION",cex.main=1,col.main="black")

m矩阵数据:

m<-structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.03468, 
               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.08419, 0.00875, 
               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.08428, 0.01774, 0.07538, 
               0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.07147, 0.00616, 0.10662, 
               0.06744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0488, 0.00326, 
               0.15874, 0.06453, 0.13466, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.04932, 
               0.00317, 0.13905, 0.04885, 0.07183, 0.11243, 0, 0, 0, 0, 0, 0, 
               0, 0, 0, 0, 0.00217, 0.00215, 0.00488, 0.001, 9e-04, 0.0021, 
               0.0024, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.06712, 0.011, 0.15263, 0.05229, 
               0.06677, 0.07933, 0.05643, 0.00581, 0, 0, 0, 0, 0, 0, 0, 0, 0.06908, 
               0.00368, 0.16238, 0.06328, 0.09534, 0.14891, 0.22466, 0.00285, 
               0.07379, 0, 0, 0, 0, 0, 0, 0, 0.068, 0.04153, 0.03829, 0.04145, 
               0.02365, 0.01565, 0.01834, 0.01035, 0.06065, 0.02488, 0, 0, 0, 
               0, 0, 0, 0.03696, 0.00052, 0.01742, 0.02982, 0.01546, 0.01098, 
               0.01147, 0.00119, 0.00953, 0.01472, 0.02941, 0, 0, 0, 0, 0, 0.03517, 
               0.00342, 0.12671, 0.0469, 0.10817, 0.1828, 0.1296, 0.00164, 0.06531, 
               0.16134, 0.01375, 0.00845, 0, 0, 0, 0, 0.06844, 0.00567, 0.19389, 
               0.07643, 0.10884, 0.13651, 0.12315, 0.00544, 0.11638, 0.214, 
               0.04113, 0.0191, 0.1258, 0, 0, 0, 0.05821, 0.00652, 0.18156, 
               0.06273, 0.10418, 0.13901, 0.13007, 0.0117, 0.10891, 0.19306, 
               0.03167, 0.01255, 0.13751, 0.24926, 0, 0, 0.06268, 0.0062, 0.15536, 
               0.06376, 0.11104, 0.11026, 0.09269, 0.00416, 0.13088, 0.18158, 
               0.04146, 0.01284, 0.11865, 0.25821, 0.21147, 0), .Dim = c(16L, 
                                                                         16L), .Dimnames = list(c("Civil \nLiberties", "Economy", "Foreign\nPolicy", 
                                                                                                  "Women's\nRights", "Workers' \nRights", "Political\nPolarisation", 
                                                                                                  "Kurdish \nPeace Process", "Presidential \nSystem", "Parallel\nState", 
                                                                                                  "HDP\nElection\nSlogans", "Government\nCorruption\nScandal", 
                                                                                                  "Environmental\nIssues", "Related \nwith\nElection", "CHP\nElection\nSlogans", 
                                                                                                  "AKP\nElection\nSlogans", "MHP\nElection\nSlogans"), c("Civil \nLiberties", 
                                                                                                                                                         "Economy", "Foreign\nPolicy", "Women's\nRights", "Workers' \nRights", 
                                                                                                                                                         "Political\nPolarisation", "Kurdish \nPeace Process", "Presidential \nSystem", 
                                                                                                                                                         "Parallel\nState", "HDP\nElection\nSlogans", "Government\nCorruption\nScandal", 
                                                                                                                                                         "Environmental\nIssues", "Related \nwith\nElection", "CHP\nElection\nSlogans", 
                                                                                                                                                         "AKP\nElection\nSlogans", "MHP\nElection\nSlogans")))

0 个答案:

没有答案