$$$$ @HISTOGR NOTICE BP208322 19/08/23 21:15:01 10289 DATE 19/08/23 Procédure @HISTOGR Voir aussi : TRAC DESS EVOL ------------------ (EVOL2 TABL2) = @HISTOGR LREE1 (TABL1) (LOGI1) Section : Post-traitement Affichage FRAN========================================================== Objet : _______ Création/Tracé de données sous forme d'histogramme Commentaire : _____________ LREE1 = Objet LISTREEL contenant les données à tracer. A chaque valeur de cette liste sera associée une barre de l'histogramme. LOGI1 = Variable LOGIQUE indiquant si on veut récupérer le graphe sous forme d'objets EVOL2 et TABL2 (à transmettre à DESS) TABL1 = Objet TABLE controlant l'apparence du graphique : - Indice 'COUL' [MOT ou LISTMOTS] = Couleur(s) des barres (défaut='DEFA') - Indice 'NOMS' [TABLE] = Legendes affectees a chaque barre (défaut=numero). - Indice 'LARG' [LISTREEL] = Largeurs des barres (défaut=[0.8 ... 0.8]) - Indice 'ESPA' [FLOTTANT] = Espace entre 2 barres (défaut=0.2) - Indice 'HPOS' [FLOTTANT] = Décalage horizontal du graphique (défaut=0.) - Indice 'INVE' [LOGIQUE] = Tracer les barres de droite à gauche ? (défaut=FAUX) - Indice 'DESS' [MOT] = Options passées à DESS (défaut=pas de tracé) La présence de ce mot-clé induit que @HISTOGR procède au tracé de l'histogramme (indépendemment de LOGI1) Exemple : _________ * Visualisation d'une distribution aléatoire gaussienne NN = 10000 ; LTIRAG1 = BRUI 'BLAN' 'GAUS' 0. 2. NN ; LTIRAG1 = LTIRAG1 - (MASQ LTIRAG1 'INFERIEUR' 0.) ; LTIRAG1 = ENTI LTIRAG1 ; IMIN1 = MINI LTIRAG1 ; NC = (MAXI LTIRAG1) - IMIN1 + 1 ; LCOMPT1 = PROG NC*0. ; REPE BLOC1 NN ; IPOS1 = (EXTR LTIRAG1 &BLOC1) + 1 - IMIN1 ; ICOMPT1 = EXTR LCOMPT1 IPOS1 ; REMP LCOMPT1 IPOS1 (ICOMPT1 + 1.) ; FIN BLOC1 ; TOPT1 = TABL ; TOPT1 . 'HPOS' = FLOT IMIN1 ; TOPT1 . 'DESS' = 'GRIL AXES' ; @HISTOGR LCOMPT1 TOPT1 FAUX ; * autre exemple : cf. dessin.dgibi ANGL========================================================== Description : _____________ Creation/Drawing of an histogram (bar graph) Comments : __________ LREE1 = LISTREEL object containing the data to be plotted. Each value in the list will give a separate bar. LOGI1 = LOGIQUE variable indicating whether EVOL2 and TABL2 objects will be returned (in order to feed DESS subsequently) TABL1 = TABLE object controlling the plot appearance : - Index 'COUL' [MOT or LISTMOTS] = Bars color(s) (default='DEFA') - Index 'NOMS' [TABLE] = Legends associated to each bar (default=number) - Index 'LARG' [LISTREEL] = Bars width(s) (default=[0.8 ... 0.8]) - Index 'ESPA' [FLOTTANT] = Spacing between adjacent bars (default=0.2) - Index 'HPOS' [FLOTTANT] = Graph horizontal offset (default=0.) - Index 'INVE' [LOGIQUE] = Draw bars from right to left ? (default=FAUX) - Index 'DESS' [MOT] = Parameters to be passed to DESS (default=no drawing) The presence of this keyword implies that @HISTOGR proceeds to the drawing (whatever LOGI1 was set up to) Example : _________ * Visualization of a Gaussian random distribution NN = 10000 ; LTIRAG1 = BRUI 'BLAN' 'GAUS' 0. 2. NN ; LTIRAG1 = LTIRAG1 - (MASQ LTIRAG1 'INFERIEUR' 0.) ; LTIRAG1 = ENTI LTIRAG1 ; IMIN1 = MINI LTIRAG1 ; NC = (MAXI LTIRAG1) - IMIN1 + 1 ; LCOMPT1 = PROG NC*0. ; REPE BLOC1 NN ; IPOS1 = (EXTR LTIRAG1 &BLOC1) + 1 - IMIN1 ; ICOMPT1 = EXTR LCOMPT1 IPOS1 ; REMP LCOMPT1 IPOS1 (ICOMPT1 + 1.) ; FIN BLOC1 ; TOPT1 = TABL ; TOPT1 . 'HPOS' = FLOT IMIN1 ; TOPT1 . 'DESS' = 'GRIL AXES' ; @HISTOGR LCOMPT1 TOPT1 FAUX ; * other examples : cf. dessin.dgibi