[Tikzdevice-bugs] ggplot-tikz examples
Cameron Bracken
cameron.bracken at gmail.com
Wed Jul 27 22:21:50 CEST 2011
Is it possible that you don't have PGF installed?
-Cameron
On Jul 27, 2011, at 2:05 PM, Felipe Carrillo wrote:
> Thanks for the quick reply, I will start using the list as soon as a figure out how :)
> I tried to run the code that you sent me and got some error messages..see below:
> Error in getMetricsFromLatex(TeXMetrics) : # Not sure what this means
> library(tikzDevice)
> Loading required package: filehash
> filehash: Simple key-value database (2.1-1 2010-10-04)
> tikzDevice: A Device for R Graphics Output in PGF/TikZ Format (v0.6.1)
> Checking for a LaTeX compiler...
>
> A working LaTeX compiler was found by checking:
> The PATH using the command pdflatex
> Global option tikzLatex set to:
> E:\MikTex\miktex\bin\pdflatex.exe
> MiKTeX-pdfTeX 2.8.3759 (1.40.10) (MiKTeX 2.8)
> Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh
>
> A working XeLaTeX compiler was found by checking:
> The PATH using the command xelatex
> Global option tikzXelatex set to:
> E:\MikTex\miktex\bin\xelatex.exe
> MiKTeX-XeTeX 2.8.3758 (0.9995.1 texlive svn 15079) (MiKTeX 2.8)
> Copyright (C) 1982 D. E. Knuth, (C) 1994-2006 by SIL International
>
> Warning message:
> package 'tikzDevice' was built under R version 2.13.1
> > tikz(standAlone=TRUE)
> > qplot(1,1)
> Creating temporary TikZ metrics dictionary at:
> C:\DOCUME~1\FCARRI~1\LOCALS~1\Temp\Rtmpd7Mnxe/tikzMetricsDictionary
> \documentclass[10pt]{article}
> \usepackage{tikz}
> \usepackage[active,tightpage,psfixbb]{preview}
> \PreviewEnvironment{pgfpicture}
> \setlength\PreviewBorder{0pt}
> \usepackage[T1]{fontenc}
> \usetikzlibrary{calc}
> \batchmode
> \begin{document}
> \begin{tikzpicture}
> \node[inner sep=0pt, outer sep=0pt, scale=0.96] (TeX) { 1%
> };
> \path let \p1 = ($(TeX.east) - (TeX.west)$),
> \n1 = {veclen(\x1,\y1)} in (TeX.east) -- (TeX.west)
> node{ \typeout{tikzTeXWidth=\n1} };
> \makeatletter
> \@@end
> This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2011.4.18) 27 JUL 2011 13:01
> entering extended mode
> **C:/DOCUME?1/FCARRI?1/LOCALS?1/Temp/Rtmpd7Mnxe/tikzStringWidthCalc.tex
> (C:/DOCUME~1/FCARRI~1/LOCALS~1/Temp/Rtmpd7Mnxe/tikzStringWidthCalc.tex
> LaTeX2e <2009/09/24>
> Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
> rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
> (E:\MikTex\tex\latex\base\article.cls
> Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
> (E:\MikTex\tex\latex\base\size10.clo
> File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
> )
> \c at part=\count79
> \c at section=\count80
> \c at subsection=\count81
> \c at subsubsection=\count82
> \c at paragraph=\count83
> \c at subparagraph=\count84
> \c at figure=\count85
> \c at table=\count86
> \abovecaptionskip=\skip41
> \belowcaptionskip=\skip42
> \bibindent=\dimen102
> )
> Error in getMetricsFromLatex(TeXMetrics) :
> TeX was unable to calculate metrics for the following string
> or character:
> 1
> Common reasons for failure include:
> * The string contains a character which is special to LaTeX unless
> escaped properly, such as % or $.
> * The string makes use of LaTeX commands provided by a package and
> the tikzDevice was not told to load the package.
> The contents of the LaTeX log of the aborted run have been printed above,
> it may contain additional details as to why the metric calculation failed.
> In addition: Warning messages:
> 1: In readLines(texOut) :
> incomplete final line found on 'C:\DOCUME~1\FCARRI~1\LOCALS~1\Temp\Rtmpd7Mnxe/tikzStringWidthCalc.log'
> 2: In readLines(texLog) :
> incomplete final line found on 'C:\DOCUME~1\FCARRI~1\LOCALS~1\Temp\Rtmpd7Mnxe/tikzStringWidthCalc.log'
> >
>
>
> Felipe D. Carrillo
> Supervisory Fishery Biologist
> Department of the Interior
> US Fish & Wildlife Service
> California, USA
> http://www.fws.gov/redbluff/rbdd_jsmp.aspx
>
> From: Cameron Bracken <cameron.bracken at gmail.com>
> To: Felipe Carrillo <mazatlanmexico at yahoo.com>
> Cc: source at sharpsteen.net; tikzDevice Bugs <tikzdevice-bugs at r-forge.wu-wien.ac.at>
> Sent: Wednesday, July 27, 2011 12:33 PM
> Subject: Re: ggplot-tikz examples
>
> Hi Felipe-
>
> Any plot that you create ggplot2 should work with tikzDevice. For example, the simplest case:
>
> tikz(standAlone=TRUE)
> qplot(1,1)
> dev.off()
>
> tikzDevice is independent of the graphics system, so any plot you put between tikz() and dev.off() should be faithfully recreated. The ggplot2 homepage (http://had.co.nz/ggplot2/) is a rich source of examples.
>
> If you do run into any inconsistencies, let us know and we will try to iron them out.
>
> Thanks for your interest!
>
> - Cameron
>
> On Jul 27, 2011, at 1:18 PM, Felipe Carrillo wrote:
>
> > Hi:
> >
> > Sorry to bother you but I am trying to find some examples of using tikzDevice and ggplot2, could you
> > point out where can I find them if any? Thanks
> >
> >
> >
> > Felipe D. Carrillo
> > Supervisory Fishery Biologist
> > Department of the Interior
> > US Fish & Wildlife Service
> > California, USA
> > http://www.fws.gov/redbluff/rbdd_jsmp.aspx
>
>
>
More information about the Tikzdevice-bugs
mailing list