Calculating values for bar charts in LaTeX
The bchart package If you want to add some bar charts to your latex document you might want to use bchart. This pdf by Tobias Kuhn shows some examples of how to use the package. Description taken from that pdf: bchart is a LATEX package for drawing simple bar charts with horizontal bars on a numerical x-axis. It is based on the TikZ drawing package. The focus of this package is on simplicity and aesthetics. Using the package one can display labels, specify the axis range, bar colors or unit of the values. Calculating values Unfortunately the package has a drawback. If you use math expressions they will be calculated for the bars but wont their values won't be displayed. In addition you cannot use \pgfmathparse{} to calculate the value for the chart because it will cause errors in displaying the bars. Which renders: I believe it is due to internal usage of pgfmath of the package. There is a simple solution though, using \\pgfmathsetmacro{}{}: Which renders: ...