matplotlib, hack for contour lines with round dashes
<p>As of matplotib 1.5, collections don't seem to have an attribute set_dash_capstyle('round'), I used this hack to obtain round dashed contour lines. This is not a question, but rather a not very elegant solution to a problem I could not find an answer.</p>

<p><a href="http://i.stack.imgur.com/zuhIn.png" rel="nofollow">default butt dashed contour lines (top), round dashed contour lines (bottom)</a></p>

<pre><code>import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt

# make data
D = np.ones((60, 60))
for i, x in enumerate(D):
    for j, y in enumerate(x):
        r = np.sqrt((0.03*float(i)-1)**2+(0.03*float(j)-1)**2)
        D[i][j] = np.sin(r)

fig, ax = plt.subplots(2,1,figsize=(4,8))

im1 = ax[0].imshow(D, vmin=np.min(D), vmax=np.max(D), aspect='auto', origin='lower')
levels = (0.3, 0.6)
cs1 = ax[0].contour(D, levels, hold='on', colors='k', origin='lower', linestyles='dashed', linewidths=5.0)
ax[0].set_title("Dashed contour lines 'butt' style")

im2 = ax[1].imshow(D, vmin=np.min(D), vmax=np.max(D), aspect='auto', origin='lower')
levels = (0.3, 0.6)
cs2 = ax[1].contour(D, levels, hold='on', colors='k', origin='lower', linestyles='dashed', linewidths=5.0)
# obtain contour lines, and delete them
cnt_line=[]
for c in cs2.collections:
    for p in c._paths:
        cnt_line.append(p.vertices)
    c.remove()
# plot contour lines again
for i, l in enumerate(cnt_line):
    ax[1].plot(l[:,0],l[:,1], color='k', ls='dashed', lw=5.0)
    ax[1].lines[i].set_dash_capstyle('round')
ax[1].set_title("Dashed contour lines 'round' style")

plt.show()
</code></pre>