matplotlib/matplotlib — pull request #1251 by jenshnielsen (2012-09-14 14:08:29+00:00)
Title: backend_pgf. Enable custom dashstyles to be used in the pgf backend 

The following code produces lines with identical standard dashes using the pgf backend.
````python
import matplotlib
matplotlib.use('pgf')
import matplotlib.pyplot as plt
import numpy as np
y = np.arange(10)

plt.plot(y,dashes=(5,1))
plt.plot(y*1.5,dashes=(2,2))
plt.plot(y*2,dashes=(1,5))
plt.legend(['line1','line2','line3'])
plt.savefig('test.pdf')
plt.savefig('test.pgf')
```
This happens because the pgf backend only takes the linestyle argument into account but ignores the dashes. In addition the dash length is scaled with the linewidth in the pgf backend. This is inconsistent with other backends (I tested pdf and agg) where it is independent of the linewidth. This pull request fixes both these issues.