[R] Exporting a plot with the LaTeX font lmodern

Marc Schwartz marc_schwartz at comcast.net
Mon Nov 19 02:46:39 CET 2007


On Mon, 2007-11-19 at 01:06 +0000, Paul Smith wrote:
> On Nov 18, 2007 8:04 PM, Paul Smith <phhs80 at gmail.com> wrote:
> > I would like to export, as a pdf file, a plot with the LaTeX font
> > lmodern as the font of my graph. Could somebody please help me?
> 
> I have tried the following but with no success:
> 
> > pdf(file="myplot.pdf",family="ComputerModern")
> Error in pdf(file = "myplot.pdf", family = "ComputerModern") :
>   unknown family 'ComputerModern'
> > names(pdfFonts())
>  [1] "serif"                "sans"                 "mono"
>  [4] "symbol"               "AvantGarde"           "Bookman"
>  [7] "Courier"              "Helvetica"            "Helvetica-Narrow"
> [10] "NewCenturySchoolbook" "Palatino"             "Times"
> [13] "URWGothic"            "URWBookman"           "NimbusMon"
> [16] "NimbusSan"            "URWHelvetica"         "NimbusSanCond"
> [19] "CenturySch"           "URWPalladio"          "NimbusRom"
> [22] "URWTimes"             "Japan1"               "Japan1HeiMin"
> [25] "Japan1GothicBBB"      "Japan1Ryumin"         "Korea1"
> [28] "Korea1deb"            "CNS1"                 "GB1"
> > names(postscriptFonts())
>  [1] "serif"                "sans"                 "mono"
>  [4] "symbol"               "AvantGarde"           "Bookman"
>  [7] "Courier"              "Helvetica"            "Helvetica-Narrow"
> [10] "NewCenturySchoolbook" "Palatino"             "Times"
> [13] "URWGothic"            "URWBookman"           "NimbusMon"
> [16] "NimbusSan"            "URWHelvetica"         "NimbusSanCond"
> [19] "CenturySch"           "URWPalladio"          "NimbusRom"
> [22] "URWTimes"             "ComputerModern"       "ComputerModernItalic"
> [25] "Japan1"               "Japan1HeiMin"         "Japan1GothicBBB"
> [28] "Japan1Ryumin"         "Korea1"               "Korea1deb"
> [31] "CNS1"                 "GB1"
> >
> 
> Paul

Paul,

You might want to review this page by Paul Murrell:

  http://www.stat.auckland.ac.nz/~paul/R/CM/CMR.html

HTH,

Marc Schwartz



More information about the R-help mailing list