'set the orientation of the event line
[ \'horizontal\' | \'vertical\' | None ]
defaults to \'horizontal\' if not specified or None'

def set_orientation(self, orientation=None):

    if ((orientation is None) or (orientation.lower() == u'none') or (orientation.lower() == u'horizontal')):
        is_horizontal = True
    elif (orientation.lower() == u'vertical'):
        is_horizontal = False
    else:
        raise ValueError(u"orientation    must    be    'horizontal'    or    'vertical'")
    if (is_horizontal == self.is_horizontal()):
        return
    self.switch_orientation()
