I wanted to include some more or less complex charts into my LaTeX document. I have attached a picture that shows an example how it should like. Is there any charts package in LaTeX that allows me to include such charts in my document? Or do I have to do that with Excel or any other tool?
Picture from the paper: The secret life of bugs: Going past the errors and omissions in software repositories
Best Answer
Here is my solution, always based on TikZ.
Basically, it allows you to define bars in which you can customize the width, the color and the scale. This because, you may wonder to change scale factor for your charts.
To introduce labels instead of simply numbers here is a solution:
The new command should be used as:
it is possible to get:
To make things easier and to have just one command, it is possible to redefine the above commands by means of an
xparse
definition:Now the last example with labels could be simplified; in order to allow the customization inside the document of the
\barwidth
and the\barheight
, I inserted two dedicated commands\setbarwidth
and\setbarheight
.