Exemples ======== Courbe représentant une fonction complexe ----------------------------------------- fc = DEFI_FONCTION( NOM_PARA='INST', NOM_RESU='DX', VALE_C=(0., 0., 0., 1., 2., 3., 2., 3., 4., 3., 4., 5., 4., 5., 6., 5., 6., 7. ),) IMPR_FONCTION( UNITE = 24, FORMAT = 'XMGRACE', PILOTE = 'POSTSCRIPT', LEGENDE_X = 'Temps (s)', LEGENDE_Y = 'DX (mm)', COURBE = ( _F(FONCTION = fc, PARTIE = 'REEL', COULEUR = 4, STYLE = 2, MARQUEUR = 5, LEGENDE = 'partie réelle',), _F(FONCTION = fc, PARTIE = 'IMAG', COULEUR = 2, STYLE = 5, MARQUEUR = 8, LEGENDE = 'partie imaginaire',), ), TITRE = "Tracé d'une fonction complexe", ) .. image:: images/100000000000034A00000253827E13130474C335.jpg :width: 4.9992in :height: 3.5327in .. _RefImage_100000000000034A00000253827E13130474C335.jpg: Courbe paramétrique ------------------- lt = DEFI_LIST_REEL(DEBUT = 0., INTERVALLE=_F(JUSQU_A=10., PAS=0.01),) fx = FORMULE(NOM_PARA='t', VALE="""2.*cos(t) - cos(2.*t)""",) cardioX=CALC_FONC_INTERP( FONCTION = fx, LIST_PARA = lt,) fy = FORMULE(NOM_PARA='t', VALE="""2.*sin(t) - sin(2.*t)""",) cardioY=CALC_FONC_INTERP( FONCTION = fy, LIST_PARA = lt,) IMPR_FONCTION( UNITE = 27, FORMAT = 'XMGRACE', TITRE = 'Cardioide', COURBE = ( _F(FONC_X = cardioX, FONC_Y = cardioY,), ), ) On obtient ainsi un fichier que l’on peut visualiser dans xmgrace: .. image:: images/100000000000034A000002537A6BAED0619AA8D8.jpg :width: 4.9992in :height: 3.5327in .. _RefImage_100000000000034A000002537A6BAED0619AA8D8.jpg: Mise en forme supplémentaire dans xmgrace: menu *Plot/Graph appearance* , type *fixed* (grille carrée), et supprimer la légende en décochant la case *Display legend* . Nappe et Nappe lissée --------------------- On obtient ainsi un fichier .png suivant. .. image:: images/1000020100000DA7000015181200B58BE5359419.png :width: 5.5138in :height: 8.5189in .. _RefImage_1000020100000DA7000015181200B58BE5359419.png: