set element visualization drawing
            
        :param p0: start drawing position, (x,y)
        :param angle: rotation angle [deg] of drawing central point, angle is rotating from x-axis to be '+' or '-', '+': anticlockwise, '-': clockwise
        :param mode: artist mode, 'plain' or 'fancy', 'plain' by default

def setDraw(self, p0=(0, 0), angle=0, mode='plain'):
        """ set element visualization drawing
            
        :param p0: start drawing position, (x,y)
        :param angle: rotation angle [deg] of drawing central point, angle is rotating from x-axis to be '+' or '-', '+': anticlockwise, '-': clockwise
        :param mode: artist mode, 'plain' or 'fancy', 'plain' by default
        """

        sconf = self.getConfig(type='simu')
        self._style['w'] = float(sconf['l'])  # element width
        _width = self._style['w']
        _height = self._style['h']
        _fc = self._style['fc']
        _ec = self._style['ec']
        _alpha = self._style['alpha']
        _kval = float(sconf['k1'])
        _lw = self._style['lw']

        if mode == 'plain':
            # _kval >= 0:
            #    p1---p2
            #    |    |
            #    |    |
            # ---p0---p3---
            #
            # _kval < 0:
            # ---p0---p3---
            #    |    |
            #    |    |
            #    p1---p2

            x0, y0 = p0

            if _kval >= 0:
                x1, y1 = x0, y0 + _height
            else:
                x1, y1 = x0, y0 - _height

            x2, y2 = x0 + _width, y1
            x3, y3 = x2, y0

            vs = [(x0, y0), (x1, y1), (x2, y2), (x3, y3), (x0, y0)]
            cs = [Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY]
            pth = Path(vs, cs)
            ptch = patches.PathPatch(pth, fc=_fc, ec=_ec, alpha=_alpha, lw=_lw)

            self._patches = []
            self._patches.append(ptch)
            self.next_p0 = x3, y3
            self.next_inc_angle = 0
        else:  # fancy mode
            #       p1
            #     /    \
            # --p0  pc  p2(nextp0)---
            #     \    /
            #       p3

            x0, y0 = p0
            x1, y1 = x0 + _width * 0.5, y0 + _height * 0.5
            x2, y2 = x1 + _width * 0.5, y0
            x3, y3 = x1, y0 - _height * 0.5
            pc = x0 + _width * 0.5, y0

            vs0 = [
                (x0, y0),
                (x1, y1),
                (x2, y2),
                (x3, y3),
                (x0, y0)
            ]
            vs = MagBlock.rot(vs0, theta=angle, pc=p0)
            cs = [
                Path.MOVETO,
                Path.CURVE3,
                Path.CURVE3,
                Path.CURVE3,
                Path.CURVE3
            ]
            pth = Path(vs, cs)
            ptch = patches.PathPatch(pth, fc=_fc, ec=_ec, alpha=_alpha, lw=_lw)

            self._patches = []
            self._patches.append(ptch)
            pout = x0 + _width, y0  # the right most point in x-axis
            self.next_p0 = tuple(MagBlock.rot(pout, theta=angle, pc=p0).tolist())
            self.next_inc_angle = 0

        pc = x0 + 0.5 * _width, y0
        self._anote = {'xypos': pc, 'textpos': pc, 'name': self.name.upper(), 'type': self.typename}