Fixing crappy looking figures in your Latex documents
When using Latex for document formatting, usually one needs to include some kind of figures in there. This can be as simple as:
[snip]
...
\usepackage{graphicx}
...
\includegraphics{path/to/file.png}
[/snip]
The only problem with this approach is, that the included image does not look pixel-perfect anymore because the conversion process has seriously reduced the quality of image.
Fortunately there's a simple workaround: you need to include these graphs as pdf:
[snip]
...
\includegraphics{path/to/file.pdf}
...
[/snip]
For example in Matplotlib you can just do:
matplotlib.pyplot.savefig('image.pdf')