3

I have to produce few charts a week and finding very hard/time consuming typing in code for plots using Tikz. Graphs i have to produce are simple,most of the time linear or exponential and does not consist allot of data. Ploting in Excel seems so easy compared to Latex... I know that I can save my excel plot as image and include it to my latex file, but excel produces very different looking chart than latex

Is there a graphical interface software or tool that would speed up process? Having software to plot for me from data table would be my Latex dream come true

9
  • 5
    Are you using 'raw' TikZ or pgfplots? The latter is pretty straight-forward provided you put in the initial effort to develop some re-usable outline files.
    – Joseph Wright
    Commented Dec 31, 2015 at 17:13
  • 1
    If you have the equation, plotting in pgfplots is as easy as pie. :)
    – Alenanno
    Commented Dec 31, 2015 at 17:19
  • im using Tikz however i have noticed that in my \usepackage i have pgfplots. So im not sure what i am using to be honest... Every plot it takes me couple of hours to do and what i am doing is googling most similar looking chart i could find and edit the code to suit my needs. Commented Dec 31, 2015 at 17:27
  • 1
    \includegraphics{plot-made-with-excel} Commented Dec 31, 2015 at 17:30
  • 11
    Maybe you could edit your question to include an example or two of plots that you produced, along with the code. Then we should be able to suggest ways of simplifying the code and streamlining the process of producing plots by using styles.
    – Jake
    Commented Dec 31, 2015 at 17:41

1 Answer 1

1

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:

mwe

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.

1
  • 1
    @Marius Kriauciunas Just my opinion. I used R in my PhD thesis and I found it very hard to customize the plots. I also found it hard to find information about how to customize the plots. In my experience you are faster and more flexible if you use pgfplots or Excel. Commented Jan 1, 2016 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .