About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account


12. Charts

Charts and diagrams can be produced in any graphical application that can export the image to a format that LaTeX can input. However it is also possible to write LaTeX code to generate the diagram. This has the advantage in that the fonts used in the diagram match those used in the rest of the document, but it's more complicated and can significantly slow the document build time.

This chapter describes LaTeX packages to generate various charts you may need in your administrative work. If you prefer to use a graphics application to generate a chart you can input the exported image using the graphicx package, as described in Volume 1, but make sure, if possible, that you export your image using a vector graphics format (such as PDF or EPS1) rather than a bitmap (such as PNG or JPEG).

There are many LaTeX packages available, ranging from general drawing packages, such as tikz or pstricks, to packages designed for specific types of charts. See, for example, the diagram topic and sub-topics such as the diagram-block topic (block diagrams) and diagram-ctrl topic (control diagrams), as well as the genchart topic (bar- or pie-charts), planning topic (timelines and schedules) and gantt topic. There's also the pgf-tikz topic (for packages that use pgf/tikz) and the pstricks topic (for packages that use pstricks).

With the increase in computer graphics over the last couple of decades, there has been a corresponding rise in jazzed-up three-dimensional charts designed to impress the lay person. Such charts can be found from glossy brochures to company annual reports or news programs, but while these images may appear visually appealing, they distort the data and can produce a misleading impression. As a chartered mathematician I can't condone such deception, whether done by design or accident, so I'm not going to show you how to produce fancy effects.

Be careful if you have large numbers or you may get the “Dimension too large” TeX error. If you are dealing with very large values (in terms of magnitude), you may be better off using a custom data-handling tool to generate the image rather than trying to use TeX.



Footnotes

... EPS1
Note that the PDF and EPS file formats also support bitmaps so, if possible, check the settings on whatever application you use to create the image files to see if it uses a vector graphics format. If the image appears fuzzy when you magnify it, then it's most likely a bitmap.

This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-07-4).

© 2015 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs