# Methods for graphing simulation data

I ran a large bootstrap simulation to gather data which I would now like to include in my paper. Currently, I have the data in an Excel spreadsheet so I could get a quick overview of what my results were. The data consists of the following:

• 2000 samples, where each sample has an "average" and "95% confidence" value
• The average values are plotted as the blue line in this graph from Excel
• The positive error bars show the outermost data point after the largest 2.5% values were removed (the 95% confidence value).
• Note: I am not trying to reproduce the exact style of this plot. I am only interested in producing the best representation of the data for my paper.

Specific questions:

1. How would you represent the data and produce a similar graphical representation in LaTeX?
2. In total there are 3 of these Excel graphs, representing simulations under 3 different conditions. It would be nice to have the option of plotting all 3 results on the same graph. How might this be achieved?
• is it possible to provide data to demonstrate with examples ? May 2, 2013 at 19:27
• Not a TeX related question...
– Rod
May 2, 2013 at 21:42
• @Rod The first question explicitly contains "in LaTeX". Aug 3, 2015 at 9:16

1: Column wise: x y error. `pgfplots` can produce such graphs. For this amount of data lualatex should be used (pdftex might produce a memory overrun and/or consume much time)

2: Possible with a custom environment e.g. But since you should use a different file for every data set, a simple copy and paste would do.

There are numerous ways to plot the data and include the graph (in a pretty way) into a LaTeX document. The way to do so strongly depends on your personal taste. My favorite 3 are (for all three of them you'll need to export your data into a text-based format, say csv).

1. Use pgfplots. Very pretty looking graphs, but I am not sure it is the best idea for large datasets.

2. Use MATLAB, plot in a usual way, then export using matlabfrag and include into LaTeX document using pstool.

3. Use gnuplot. Then export using tikz terminal. A nice example is here.