[R] Exporting a plot with the LaTeX font lmodern

Paul Smith phhs80 at gmail.com
Mon Nov 19 22:51:50 CET 2007


On Nov 19, 2007 1:46 AM, Marc Schwartz <marc_schwartz at comcast.net> 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"
> > >
> >
>
> You might want to review this page by Paul Murrell:
>
>   http://www.stat.auckland.ac.nz/~paul/R/CM/CMR.html

Thanks, Marc. That is too complicated! I prefer to export my data from
R to Gnumeric and use Gnumeric as the figure producer. I hope R will
improve with regard to this issue, so that in the future everything
can be done inside R.

Paul



More information about the R-help mailing list