Variance gamma process, simulation and plot differ from ideal I have simulated one possible path of a variance gamma process by the following code:
vektor<-c(1:23)

S0=20
theta=0.01

v=5
sigma=0.1

vektor[1]<-S0

for (i in 2:23){
randomgamma<-rgamma(1, shape=1/v, scale = v)
randomnormal<-rnorm(1,mean=0,sd=1)
vektor[i]<-vektor[i-1]+theta*randomgamma+sigma*sqrt(randomgamma)*randomnormal
}

plot(c(1:23),vektor)
lines(c(1:23),vektor)

The idea is to be found on page 26 in the following paper:
http://www.rhsmith.umd.edu/faculty/mfu/fu_files/Fu07.pdf
Now my problem is, that the plot does not look like a variance gamma process, these should look like this:

or this demonstration.
So where is my mistake?
In general: Is what I am doing correct? I want to simulate a stock path. The initial value of the stock is 20. Now, I want to simulate different paths. What parameters should I use to get a realistic result? 
 A: I am using the variance gamma as well, and I just plotted it using the same algorithm implemented in R (which is what you use as well I guess).
Simply change your 8th line of code as follows:
randomgamma<-rgamma(1, shape=1/v, scale = 1/v)

The issue with your code is the scale parameter. The scale parameter in the algorithm you refer to was meant to be a 'rate parameter' instead of a frequency parameter. However, R only interprets it as a frequency type of parameter. Good luck.
A: Your procedure is correct. I just check in Monte Carlo Methods in Financial Engineering. In this book they use theta = 0; sigma = 0.4 and v = 1 and 0.5 (subordinator).
With v = 1, you will get more peaked curve (fatter tails). As you reduce v, your pdf will looks like Normal.
To get the plot in Matlab.
S = price vector
plot(S,'.');

You will get disjoint points (not line). If you find a better way to plot, please let me know.
Once you get the price vector, plot the PDF:
S is a vector
 >mu = mean(S);
 > sigma = std(S);
 > x=linspace(mu-4*sigma, mu+4*sigma);
 > plot(x,normpdf(x,mu,sigma))

