Unfortunately pymantidplot.pyplot doesn’t support controlling the line styles individually. That is one of the many features of mantidplot that are not directly supported.
It can be done, but it is undocumented, and there is no “matplotlib-like” interface for it. Modifying Andrei’s example, if you want to plot a first line as solid line and then a second line as a dashed-dotted line you can do as follows:
import numpy as np
lines1=plot(w1, 0, linestyle='-')
lines2=plot(w2, 0, hold='on')
line = lines2
# The '0' passed to setCurveLineStyle() is the index of the line
# Style alternatives: '-', '--', '-.', ':'