We will draw a regression line through some points, as in http://pgfplots.net/tikz/examples/regression-line/ . This time, we will implement a style for negative and positive residuals…

Using PGFPlotstable, we can use a naive numerical integration scheme to find the function directly within LaTeX. This code was written by Jake on TeX.SE.…

Here, the trick is to use stack plots=y together with closedcycle to create the error bands. We define a new command, \addplotwitherrorbands[<optional styles>]{<function>}{<positive error>} {<negative…

Here’s an approach using pgfplotstable to calculate the Brownian motions as cumulative sums of random normally distributed values. You have to first initialize an empty…

We would like to plot several two-dimensional functions in a three-dimensional graph. Tabulated data can be plotted in different planes quite easily by using addplot3…

We would like to create a heatmap using TikZ. Basically, we have a table of values and each value is assigned a color. We map…