My suggestion is also R, that is a software environment for statistical computing that can produce easily a vast range of graphics with a few lines of code.
Not surprisingly, you can use R separately to save graphs as .png
or .pdf
files, for later inclusions in LaTeX as normal images. But not so obvious, you can also insert R code between the LaTeX code in a file with the .Rnw
extension, and thanks to R package knitr
, this file is exported to a .tex
version where original LaTeX code remain unaltered, but the R code is substituted by the result to be printed in LaTeX code.
In other words, if you write 2+3
as R code in between the .Rnw
file, you will obtain 5
(the R result) in the .tex
and .pdf
version, and the same apply to plot functions, i.e., if you write this .Rnw file:
\documentclass[a5paper]{article}
\begin{document}
<<mwe,echo=F>>=
library(chemCal)
data(massart97ex3)
m <- lm(y ~ x, data = massart97ex3)
calplot(m)
@
\end{document}
You should obtain this graph in the PDF file:

This big advantage of this method is that if you modify your data, you can update all the statistics and graphs just compiling again, so it is ideal for a automated reports. Another is the reproducible research: the original .Rnw
of a paper allow to know how the results of this paper were obtained exactly.
Some editors as RStudio or LyX take care of the conversion process at the time of compile the PDF. Therefore, in the user side it is equally easy compile .Rnw
or true LaTeX files.
pgfplots
? The latter is pretty straight-forward provided you put in the initial effort to develop some re-usable outline files.pgfplots
is as easy as pie. :)\includegraphics{plot-made-with-excel}