# proper tool for charts in tex

I have scanned data graphics in a large ms written in TeX (of course). For copyright reasons I need to redraw these. My publisher may (sadly) decide not to use my source directly, so will need access to my drawings separate from my text.

I can think of several possible workflows; I'm looking for recommendations.

• Use tikz, tikz-pgf, pgfplots. I'd have to learn these packages, but that in itself would be fun and useful. Can these generate good standalone images as well as ones included in my document?

• Use r, and export to pdf. I'd have to learn the r, but I have a really good consultant.

• Use inkscape (which I've begun learning).

• Use Excel, export to pdf. I am already doing this in some places where it's appropriate in context. I'd rather not have all the graphics look Excel-generated.

Other suggestions welcome.

If you're curious, the project is http://www.cs.umb.edu/~eb/qrbook/qrbook.pdf

• Inkscape and R can produce TikZ code, so going this way should provide you consistent results. PS: Looks interesting! – Uwe Ziegenhagen May 30 '13 at 13:27
• PGFPlots can definitely be used to generate good standalone images (and it's much easier to get a consistent look than with Excel). Could you maybe point out which kind of graphs from your book you're thinking of? The line and bar charts taken from the Boston Globe? – Jake May 30 '13 at 13:29
• a brief glance (reading a few pages) is enough to convince me i would like my own copy; when is publication scheduled? – wasteofspace May 31 '13 at 10:52
• @wasteofspace I wish I knew. In the meanwhile, the pdf is free for the taking. We can correspond about this in a parallel conversation if you like. – Ethan Bolker May 31 '13 at 18:21
• The images in your manuscript can certainly be done nicely in pgfplots/tikz. On the other hand I would try to negotiate with your publisher. Your intention of common sense mathematics includes in my opinion the deciphering of real world diagrams, however badly they may distort the data (3D pie, etc.) – Alexander Jun 4 '13 at 12:23

Personally, I would take the time to learn tikz-pgf and pgfplots. Both have excellent manuals.

I tried to get along using Illustrator or Inkscape, but I just couldn't get the figures to look as consistent as if they were generated by tikz. In the long-run, this will also save a lot of time because pgfplots will take care of labeling axes properly etc. and it is very easy to reuse bits of code.

You can get the .tex file containing your figure to compile to a properly cropped stand-alone figure using the preview package. The code would be like this:

\documentclass{article}
\usepackage{tikz,pgfplots}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment[]{tikzpicture}
\PreviewEnvironment[]{pgfpicture}
\begin{document}

• Take also a look at the excellent standalone class and package, which does the preview setup for you and makes it possible to include the figures (and compile them with your document) as well as to compile them separately. – Daniel Jun 4 '13 at 14:23