def Plot_Impact_PolProjPoly(lS, Leg="", ax=None, Ang='theta', AngUnit='rad',
                            Sketch=True, dP=None,
                            dLeg=_def.TorLegd, draw=True, fs=None,
                            wintit=None, tit=None, Test=True):
    """ Plotting the toroidal projection of a Ves instance

    D. VEZINET, Aug. 2014
    Inputs :
        T           A Ves instance
        Leg         A str (the legend label to be used if T is not a Ves instance)
        ax          A plt.Axes instance (if given) on which to plot the projection space, otherwise ('None') a new figure/axes is created
        Dict        A dictionnary specifying the style of the boundary polygon plot
        dLeg        A dictionnary specifying the style of the legend box
    Outputs :
        ax          The plt.Axes instance on which the poloidal plot was performed
    """
    if Test:
        Lax, C0, C1, C2 = _check_Lax(ax,n=1)
        assert C0 or C1, 'Arg ax should a plt.Axes instance !'
        assert dP is None or type(dP) is dict, "Arg dP must be a dictionary !"
        assert dLeg is None or type(dLeg) is dict, "Arg dLeg must be a dictionary !"
        assert Ang in ['theta','xi'], "Arg Ang must be in ['theta','xi'] !"
        assert AngUnit in ['rad','deg'], "Arg AngUnit must be in ['rad','deg'] !"
    C0 = issubclass(lS.__class__, utils.ToFuObject)
    C1 = (isinstance(lS,list)
          and all([issubclass(ss.__class__, utils.ToFuObject) for ss in lS]))
    msg = "Arg lves must be a Struct subclass or a list of such !"
    assert C0 or C1, msg
    if C0:
        lS = [lS]
    nS = len(lS)

    # Get Sketch
    if ax is None:
        if wintit is None:
            wintit = _wintit
        ax, axsketch = _def.Plot_Impact_DefAxes('Cross', fs=fs, wintit=wintit,
                                                Ang=Ang, AngUnit=AngUnit,
                                                Sketch=Sketch)

    if dP is not None:
        dp = dP

    # Get up/down limits
    pPmax, pPmin = 0, 0
    for ss in lS:
        pmax = np.max(ss.dsino['EnvMinMax'])
        if pmax>pPmax:
            pPmax = pmax
        pmin = np.min(ss.dsino['EnvMinMax'])
        if pmin<pPmin:
            pPmin = pmin
    if nS>0:
        DoUp = (pPmin,pPmax)
        nP = pmax.size

    handles, labels = ax.get_legend_handles_labels()
    for ii in range(0,nS):

        Theta, pP = lS[ii].dsino['EnvTheta'], lS[ii].dsino['EnvMinMax'][0,:]
        pN = lS[ii].dsino['EnvMinMax'][1,:]
        if Ang=='xi':
            Theta, pP, pN = _GG.ConvertImpact_Theta2Xi(Theta, pP, pN)
        Theta = Theta.ravel()

        if dP is None:
            dp = {'facecolor':lS[ii].get_color(), 'edgecolor':'k',
                  'linewidth':1., 'linestyle':'-'}

        if lS[ii]._InOut=='in':
            ax.fill_between(Theta, pP, DoUp[1]*np.ones((nP,)),**dp)
            ax.fill_between(Theta, DoUp[0]*np.ones((nP,)), pN,**dp)
        elif lS[ii]._InOut=='out':
            ax.fill_between(Theta, pP, pN, **dp)
        else:
            msg = "self._InOut not defined for {0}".format(lS[ii].Id.Cls)
            raise Exception(msg)
        proxy = plt.Rectangle((0,0),1,1, fc=dp['facecolor'])
        handles.append(proxy)
        labels.append(lS[ii].Id.Cls+' '+lS[ii].Id.Name)

    if nS>0:
        ax.set_ylim(DoUp)
    if not dLeg is None:
        ax.legend(handles,labels,**dLeg)
    if draw:
        ax.figure.canvas.draw()
    return ax
Plotting the toroidal projection of a Ves instance

    D. VEZINET, Aug. 2014
    Inputs :
        T           A Ves instance
        Leg         A str (the legend label to be used if T is not a Ves instance)
        ax          A plt.Axes instance (if given) on which to plot the projection space, otherwise ('None') a new figure/axes is created
        Dict        A dictionnary specifying the style of the boundary polygon plot
        dLeg        A dictionnary specifying the style of the legend box
    Outputs :
        ax          The plt.Axes instance on which the poloidal plot was performed