Category Archives: Graphics

There is a new version of pgfSweave, and its awesome!

I just uploaded version 1.2.1 of pgfSweave, and I think it is just great! The most notable new feature is the use of the TikZ externalization library list and make feature instead of the pgf \begingraphicnamed functionality. This has some important consequences:

  1. PGF 2.10 is required! This has been out for some months now but many LaTeX distros are notoriously slow at updating, so you may need to update manually.
  2. Backward compatibility may break with some documents who still have the \pgfrealjobname hardcoded or who use the tex.driver option.
  3. A new workflow is required to compile documents (it includes make), this is outlined in the vignette.
  4. You can use all the nifty features in the TikZ externalization library, see the TikZ/PGF manual for more details.
  5. Most importantly it is faster!

There are a boat load of other changes and new features, I think you like it, check them out:

Version 1.2.1 – 2011-04-03
* [NEW] If PGF 2.10 is not available, issue a startup message but still
        load the package (So the package can go on CRAN). PGF 2.10
        is still required to compile .tex file produced with pgfSweave
* [NEW] Remove null device code which could cause problems with grid
* [NEW] Example using xelatex for external graphics
* [NEW] Chunk options `relwidth’ and `relheight’ for scaling figures
        relative to the `width’ and `height’ options (thanks to Fabrice
        Rossi for the patch)
* [CHANGED] Fix the internal caching of external graphics, it now works as
        expected and can save significant time

Version 1.2.0 – 2011-02-21
* [NEW] Use the tikz externalization library instead of the pgf backend.
        This allows for more flexibility and faster compilations but
        BEWARE, this requires at least pgf 2.10 and may break backward
        computability in some cases
* [NEW] GNU Make is now a system requirement for externalizing graphics,
        NOT for compiling the package
* [NEW] Option to specify number of processors when externalizing graphics
* [NEW] Externalized graphics now have another layer of crude caching
* [NEW] Highlighted output is now output in a separate environment to fix
        the centering issues
* [NEW] Example document using plain latex and the tikz external library
        to generate eps graphics,
* [CHANGED] The command line interface is now much simpler internally
        and uses optparse instead of getopt for more flexibility (the
        optparse package is now a dependency)
* [CHANGED] The `tex.driver’ option has been removed, the same effect can
        be achieved using the tikz externalization library, see the new
        example for how
* [DEPRECIATED] The `pgf’ option is depreciated, please use the `tikz’

pgfSweave 1.1.3 and Beyond

pgfSweave 1.1.3 is now on CRAN. This release adds a few new features and fixes some bugs

  • The pesky Rplots.pdf file is not generated anymore
  • Brand new vignette by Hans Ekbrand on the use of pgfSweave with large data sets based on this site.
  • New example on using caching by Yihui Xie
  • Reusing code chunks now works as expected
  • Inline comments are now preserved when tidy=T (thanks to changes in the formatR)

Please see the NEWS file for the full list sicce version 1.1.0.

I am also now working on the next version of pgfSweave to be version 1.2. This version will make some considerable changes to improve efficiency, namely

  • Scrap the “old” externalization (\beginpgfgraphicnamed) in favor of the tikz external library (\tikzexternalize) which will allow for parallel compilation of external graphics
  • Improve recognition of changes to plotting chunks for efficiency
  • Fix centering of \include‘d images and highlighted output
  • Improve upon the package load time
  • Spif up the command line interface with some new options

pgfSweave 1.1.0 now on CRAN!

The next release of pgfSweave is now on CRAN! It has been a while since I posted about pgfSweave and there have been some significant changes in the past couple of months.

The main new features are:

  • Automatic code highlighting via the highlight package. This can be turned off with the highlight option.
  • “Tidying” of source code output via the tidy option.
  • Access to tikzDevice sanitization through a code chunk option sanitize
  • Automatic addition of the \pgfrealjobname command if it does not exist similarly to the addition of the \usepackage{Sweave} line.
  • Setting tex.driver=latex will now (in addition to working) generate an eps file

And of course bug fixes:

  • Fixes for bunches of issues related to the changes in Sweave in R 2.12. I think these issues are now resolved (fingers crossed)
  • keep.source actually works now.

See the NEWS file for the complete list of changes and the vignette for information on now to use the new options.