def set_linestyle(self, style):
try:<EOL><INDENT>offset, dashes = self.dashd[style]<EOL><DEDENT>except:<EOL><INDENT>raise ValueError('<STR_LIT>' % style)<EOL><DEDENT>self._linestyle = style<EOL>self.set_dashes(offset, dashes)<EOL>
Set the linestyle to be one of ('solid', 'dashed', 'dashdot',
'dotted').