igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] postscript and label.family


From: Gabor Csardi
Subject: Re: [igraph] postscript and label.family
Date: Sat, 7 Jul 2007 00:16:12 +0200
User-agent: Mutt/1.5.12-2006-07-14

Vincent, you need to include the fonts to be used in the 'postscript'
call, otherwise only 'Helvetica' is available. Unfortunately for igraph
the default is 'serif', hence the error message. Here is how to do it, 
the trick is the 'fonts' argument of 'postscript':

g <- graph.ring(10)
E(g)$label <- sample(letters, ecount(g))

postscript("/tmp/test.eps", fonts=c("serif", "Palatino"))
plot(g, layout=layout.circle, vertex.label.family="serif",
     edge.label.family="Palatino", vertex.label.cex=2,
     edge.label.cex=2)
dev.off()

Of course in this case 'vertex.label.family' could be omitted as
the default is 'serif' anyway.

Another solution would be to set the default font to 'serif' with
ps.options.

Best,
Gabor

On Fri, Jul 06, 2007 at 05:50:36PM -0400, Vincent Matossian wrote:
> 
>   Hi,
> 
> I'm experiencing this error when saving a plot as postscript:
> 
> Error in text.default(x, y, labels = labels, col = label.color, family =
> label.family,  :
>         family 'serif' not included in PostScript device
> 
> Even though names(postscriptFonts()) shows that "serif" is included first!
> 
> > names(postscriptFonts())
>  [1] "serif"                "sans"                 "mono"                
> "symbol"             
>  [5] "AvantGarde"           "Bookman"              "Courier"             
> "Helvetica"          
>  [9] "Helvetica-Narrow"     "NewCenturySchoolbook" "Palatino"            
> "Times"              
> [13] "URWGothic"            "URWBookman"           "NimbusMon"           
> "NimbusSan"          
> [17] "URWHelvetica"         "NimbusSanCond"        "CenturySch"          
> "URWPalladio"        
> [21] "NimbusRom"            "URWTimes"             "ComputerModern"      
> "ComputerModernItalic"
> [25] "Japan1"               "Japan1HeiMin"         "Japan1GothicBBB"     
> "Japan1Ryumin"       
> [29] "Korea1"               "Korea1deb"            "CNS1"                
> "GB1"               
> 
> 
> I'm only having this problem using igraph but it might not be related to it, 
> so
> I'm sorry if this is actually off topic.
> 
> But if anyone has had this problem or how I could fix it that would be great
> because this is preventing me from saving to .ps
> 
> 
> Thanks!
> 
> Vincent
> 
> PS (the other one): this is igraph 5.0 and R 2.5.0. same problem on windows 
> and
> mac.

> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help


-- 
Csardi Gabor <address@hidden>    MTA RMKI, ELTE TTK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]