source: Sophya/trunk/SophyaPI/PIext/servnobjm.cc@ 330

Last change on this file since 330 was 330, checked in by ercodmgr, 26 years ago

Amelioration du Help pour piapp (Groupe de Help) Reza 24/6/99

File size: 16.7 KB
Line 
1#include <stdio.h>
2#include <stdlib.h>
3#include <ctype.h>
4
5#include <typeinfo>
6#include <iostream.h>
7#include <string>
8#include <list>
9#include <map>
10#if defined(__KCC__)
11using std::string ;
12#include <list.h>
13#include <map.h>
14#endif
15
16#include "strutil.h"
17
18#include "nobjmgr.h"
19#include "servnobjm.h"
20#include "nomgadapter.h"
21#include "pistdimgapp.h"
22
23#include "histos.h"
24#include "histos2.h"
25#include "ntuple.h"
26#include "hisprof.h"
27
28#include "piscdrawwdg.h"
29#include "pisurfdr.h"
30#include "pipodrw.h"
31
32
33
34/* --Methode-- */
35Services2NObjMgr::Services2NObjMgr(PIStdImgApp* app, string& tmpdir)
36{
37TmpDir = tmpdir;
38PDynLinkMgr::SetTmpDir(tmpdir);
39mImgapp = app;
40dynlink = NULL;
41InitGrAttNames();
42}
43
44/* --Methode-- */
45Services2NObjMgr::~Services2NObjMgr()
46{
47CloseDLL();
48}
49
50/* --Methode-- */
51void Services2NObjMgr::RegisterClass(AnyDataObj* o, NObjMgrAdapter* oa)
52{
53ObjAdaptList::iterator it;
54for(it = objadaplist.begin(); it != objadaplist.end(); it++)
55 if (typeid(*o) == typeid(*((*it).obj))) THROW(dupIdErr);
56
57dataobj_adapter oba;
58oba.obj = o;
59oba.obja = oa;
60objadaplist.push_back(oba);
61}
62
63/* --Methode-- */
64NObjMgrAdapter* Services2NObjMgr::GetAdapter(AnyDataObj* o)
65{
66ObjAdaptList::iterator it;
67for(it = objadaplist.begin(); it != objadaplist.end(); it++)
68 if (typeid(*o) == typeid(*((*it).obj))) return((*it).obja->Clone(o));
69return(new NObjMgrAdapter(o));
70}
71
72/* --Methode-- */
73void Services2NObjMgr::Nobj_ComputeExpressions(NObjMgrAdapter* obja, string& expx, string& expy, string& expz,
74 string& expwt, string& expcut, NTuple* nt, Histo* h1, Histo2D* h2, HProf* hp)
75{
76if (obja == NULL) return;
77NTupleInterface* objnt = obja->GetNTupleInterface();
78if (objnt == NULL) return;
79string vardec = objnt->VarList_C("_zz61qq_");
80
81PlotExprFunc f = LinkExprFunc(vardec, expx, expy, expz, expwt, expcut);
82if (!f) {
83 cerr << "NamedObjMgr_ComputeExpressions() Error Creation PlotExprFunc " << endl;
84 return;
85 }
86
87double xnt[10];
88float fxnt[10];
89
90int i,j,k;
91for(i=0; i<10; i++) xnt[i] = 0.;
92
93TRY {
94 double* xn;
95 for(k=0; k<objnt->NbLines(); k++) {
96 xn = objnt->GetLineD(k);
97 if (f(xn, xnt, xnt+1, xnt+2, xnt+3) != 0) {
98 if (nt) {
99 for(i=0; i<4; i++) fxnt[i] = xnt[i];
100 nt->Fill(fxnt);
101 }
102 if (h1) h1->Add(xnt[0], xnt[3]);
103 if (h2) h2->Add(xnt[0], xnt[1], xnt[3]);
104 if (hp) hp->Add(xnt[0], xnt[1], xnt[3]);
105 }
106 }
107 }
108CATCH(merr) {
109 fflush(stdout);
110 cout << endl;
111 cerr << endl;
112 string es = PeidaExc(merr);
113 cerr << "NamedObjMgr_ComputeExpressions() Exception :" << merr << es;
114 } ENDTRY;
115
116
117// Fermeture du fichier .so
118CloseDLL();
119return;
120}
121
122
123/* --Methode-- */
124PlotExprFunc Services2NObjMgr::LinkExprFunc(string& vardec, string& expx, string& expy, string& expz,
125 string& expwt, string& cut)
126{
127FILE *fip;
128string fname = TmpDir + "expf_pia_dl.c";
129string cmd;
130int rc;
131
132cmd = "rm -f " + fname;
133rc = system(cmd.c_str());
134//DBG printf("LinkExprFunc_Do> %s (Rc=%d)\n", cmd.c_str(), rc);
135
136if ((fip = fopen(fname.c_str(), "w")) == NULL) {
137 string sn = fname;
138 cout << "NamedObjMgr/LinkExprFunc_Erreur: Pb. Ouverture " << sn << endl;
139 return(NULL);
140 }
141
142// constitution du fichier a compiler
143fputs("#include <math.h> \n", fip);
144fputs("int expf_pia_dl_func(double* _zz61qq_, double* _rx_61qq_, double* _ry_61qq_, double* _rz_61qq_, double* _wt_61qq_) \n{\n", fip);
145fprintf(fip,"%s \n", vardec.c_str());
146fprintf(fip, "if (!(%s)) { *_rx_61qq_ = *_ry_61qq_ = *_rz_61qq_ = *_wt_61qq_ = 0.; return(0); } \n", cut.c_str());
147fprintf(fip, "*_rx_61qq_ = %s ; \n", expx.c_str());
148fprintf(fip, "*_ry_61qq_ = %s ; \n", expy.c_str());
149fprintf(fip, "*_rz_61qq_ = %s ; \n", expz.c_str());
150fprintf(fip, "*_wt_61qq_ = %s ; \n", expwt.c_str());
151fputs("return(1); \n} \n", fip);
152fclose(fip);
153string func = "expf_pia_dl_func";
154return((PlotExprFunc)LinkFunctionFromFile(fname, func));
155}
156
157
158/* --Methode-- */
159DlFunction Services2NObjMgr::LinkFunctionFromFile(string const & fname, string const & funcname)
160{
161// Le link dynamique
162CloseDLL();
163dynlink = PDynLinkMgr::BuildFromCFile(fname);
164if (dynlink == NULL) {
165 cerr << "NamedObjMgr/LinkFunctionFromFile_Erreur: Erreur creation/Ouverture SO " << endl;
166 return(NULL);
167 }
168
169DlFunction retfunc = dynlink->GetFunction(funcname);
170if (retfunc == NULL) {
171 string sn = funcname;
172 cerr << "NamedObjMgr/LinkExprFunc_Erreur: Erreur linking " << sn << endl;
173 CloseDLL();
174 return(NULL);
175 }
176else return(retfunc);
177}
178
179/* --Methode-- */
180void Services2NObjMgr::CloseDLL()
181{
182if (dynlink) delete dynlink; dynlink = NULL;
183}
184
185/* --Methode-- */
186void Services2NObjMgr::PlotFunc(string const & expfunc, float xmin, float xmax, int np, string dopt)
187{
188FILE *fip;
189string fname = TmpDir + "func1_pia_dl.c";
190string cmd;
191int rc;
192
193if (!mImgapp) return;
194
195cmd = "rm -f " + fname;
196rc = system(cmd.c_str());
197// printf("PlotFunc_Do> %s (Rc=%d)\n", cmd.c_str(), rc);
198
199if ((fip = fopen(fname.c_str(), "w")) == NULL) {
200 string sn = fname;
201 cout << "NamedObjMgr/PlotFunc_Erreur: Pb. Ouverture " << sn << endl;
202 return;
203 }
204
205// constitution du fichier a compiler
206fputs("#include <math.h> \n", fip);
207fputs("double func1_pia_dl_func(double x) \n{\n", fip);
208fprintf(fip,"return(%s); \n}\n", expfunc.c_str());
209fclose(fip);
210
211string func = "func1_pia_dl_func";
212DlFunctionOfX f = (DlFunctionOfX) LinkFunctionFromFile(fname, func);
213if (!f) return;
214PlotFunc(f, xmin, xmax, np, dopt);
215CloseDLL();
216return;
217}
218
219/* --Methode-- */
220void Services2NObjMgr::PlotFunc2D(string const & expfunc, float xmin, float xmax, float ymin, float ymax,
221 int npx, int npy, string dopt)
222{
223FILE *fip;
224string fname = TmpDir + "func2_pia_dl.c";
225string cmd;
226int rc;
227
228if (!mImgapp) return;
229
230cmd = "rm " + fname;
231rc = system(cmd.c_str());
232// printf("PlotFunc2D_Do> %s (Rc=%d)\n", cmd.c_str(), rc);
233
234if ((fip = fopen(fname.c_str(), "w")) == NULL) {
235 string sn = fname;
236 cout << "NamedObjMgr/PlotFunc2D_Erreur: Pb. Ouverture " << sn << endl;
237 return;
238 }
239
240// constitution du fichier a compiler
241fputs("#include <math.h> \n", fip);
242fputs("double func2_pia_dl_func(double x, double y) \n{\n", fip);
243fprintf(fip,"return(%s); \n}\n", expfunc.c_str());
244fclose(fip);
245
246string func = "func2_pia_dl_func";
247DlFunctionOfXY f = (DlFunctionOfXY) LinkFunctionFromFile(fname, func);
248if (!f) return;
249PlotFunc2D(f, xmin, xmax, ymin, ymax, npx, npy, dopt);
250CloseDLL();
251return;
252}
253
254/* --Methode-- */
255void Services2NObjMgr::PlotFuncFrCFile(string const & fname, string const & func, float xmin, float xmax,
256 int np, string dopt)
257{
258DlFunctionOfX f = (DlFunctionOfX) LinkFunctionFromFile(fname, func);
259if (!f) return;
260PlotFunc(f, xmin, xmax, np, dopt);
261CloseDLL();
262return;
263}
264
265/* --Methode-- */
266void Services2NObjMgr::PlotFunc2DFrCFile(string const & fname, string const & func, float xmin, float xmax,
267 float ymin, float ymax, int npx, int npy, string dopt)
268{
269DlFunctionOfXY f = (DlFunctionOfXY) LinkFunctionFromFile(fname, func);
270if (!f) return;
271PlotFunc2D(f, xmin, xmax, ymin, ymax, npx, npy, dopt);
272CloseDLL();
273return;
274}
275
276/* --Methode-- */
277void Services2NObjMgr::PlotFunc(DlFunctionOfX f, float xmin, float xmax, int np, string dopt)
278{
279if (!mImgapp) return;
280
281int k;
282if (np < 1) np = 1;
283if (xmax <= xmin) xmax = xmin+1.;
284Vector* vpy = new Vector(np);
285
286double xx;
287double dx = (xmax-xmin)/np;
288TRY {
289 for(k=0; k<np; k++) { xx = xmin+dx*k; (*vpy)(k) = f(xx); }
290} CATCH(merr) {
291 fflush(stdout);
292 cout << endl;
293 cerr << endl;
294 string es = PeidaExc(merr);
295 cerr << "Services2NObjMgr::PlotFunc() Exception :" << merr << es;
296 delete vpy;
297 vpy = NULL;
298 } ENDTRY;
299
300
301if (vpy) {
302 string nom = "Func";
303 P1DArrayAdapter* vya = new POVectorAdapter(vpy, true);
304 vya->DefineXCoordinate(xmin, (xmax-xmin)/np);
305 PIYfXDrawer* dr = new PIYfXDrawer(vya, NULL, true) ;
306 bool fgsr = true;
307 dopt = "thinline," + dopt;
308 int opt = DecodeDispOption(dopt, fgsr);
309 int wrsid = mImgapp->DispScDrawer(dr, nom, opt);
310 if (fgsr) mImgapp->RestoreGraphicAtt();
311 }
312
313return;
314}
315
316/* --Methode-- */
317void Services2NObjMgr::PlotFunc2D(DlFunctionOfXY f, float xmin, float xmax, float ymin, float ymax,
318 int npx, int npy, string dopt)
319{
320if (!mImgapp) return;
321
322if (npx < 3) npx = 3;
323if (npy < 3) npy = 3;
324if (npx > 250) npx = 250;
325if (npy > 250) npy = 250;
326if (xmax <= xmin) xmax = xmin+1.;
327if (ymax <= ymin) ymax = ymin+1.;
328
329Matrix* mtx = new Matrix(npy, npx);
330
331int i,j;
332double xx, yy;
333double dx = (xmax-xmin)/npx;
334double dy = (ymax-ymin)/npy;
335// printf(" -- DBG -- %d %d , %g %g , %g %g \n", npx, npy, xmin, xmax, ymin, ymax);
336TRY {
337 for(j=0; j<npy; j++) {
338 yy = ymin+dy*j;
339 for(i=0; i<npx; i++) {
340 xx = xmin+dx*i;
341 (*mtx)(j, i) = f(xx, yy);
342 }
343 }
344} CATCH(merr) {
345 fflush(stdout);
346 cout << endl;
347 cerr << endl;
348 string es = PeidaExc(merr);
349 cerr << "Services2NObjMgr::PlotFunc2D() Exception :" << merr << es;
350 delete mtx; mtx = NULL;
351 } ENDTRY;
352
353if (mtx) {
354 string nom = "Func2";
355 int wrsid = 0;
356 bool fgsr = true;
357 int opt = DecodeDispOption(dopt, fgsr);
358 P2DArrayAdapter* arr = new POMatrixAdapter(mtx, true);
359 arr->DefineXYCoordinates(xmin, ymin, dx, dy);
360 PISurfaceDrawer* sdr = new PISurfaceDrawer(arr, true, true, true);
361 wrsid = mImgapp->Disp3DDrawer(sdr, nom, opt);
362 if (fgsr) mImgapp->RestoreGraphicAtt();
363 }
364
365return;
366}
367
368/* --Methode-- */
369string Services2NObjMgr::FileName2Name(string const & fn)
370{
371
372char fsep[2] = {FILESEP, '\0'};
373char tsep[2] = {'.', '\0'};
374size_t p = fn.find_last_of(fsep);
375size_t l = fn.length();
376if (p >= l) p = 0;
377else p++;
378size_t q = fn.find_first_of(tsep,p);
379if (q < p) q = l;
380return(fn.substr(p,q-p));
381}
382
383
384typedef vector<string> GraTok;
385
386/* --Methode-- */
387int Services2NObjMgr::DecodeDispOption(string& gratt, bool& fgsrgr)
388{
389int ropt = Disp_Next;
390if (!mImgapp) return(ropt);
391
392for(int i=0; i<gratt.length(); i++) gratt[i] = tolower(gratt[i]);
393
394if (fgsrgr) mImgapp->SaveGraphicAtt();
395
396if ( (gratt == "def") || (gratt == "default") ) { // Remise aux valeurs par defaut = non defini
397 mImgapp->SetColAtt();
398 mImgapp->SetLineAtt();
399 mImgapp->SetFontAtt();
400 mImgapp->SetMarkerAtt();
401 mImgapp->SetColMapId();
402 mImgapp->SetZoomAtt();
403 return(ropt);
404 }
405
406// On separe en mots separes par des virgules
407gratt = ","+gratt;
408size_t p = 0;
409size_t q = 0;
410size_t l = gratt.length();
411string token;
412
413GraTok grt;
414
415while (q < l) {
416 p = gratt.find_first_not_of(" ,",q+1); // au debut d'un token
417 if (p>=l) break;
418 q = gratt.find_first_of(" ,",p); // la fin du token;
419 token = gratt.substr(p,q-p);
420 grt.push_back(token);
421 }
422
423
424static GrAttNames::iterator it;
425
426int k;
427bool fgcont = true;
428fgsrgr = false;
429
430for(k=0; k<grt.size(); k++) {
431// cout << "--DBG--SetGraphicAttributes() " << grt[k] << endl;
432
433 // Decodage option affichage (win, next, etc
434 fgcont = true;
435 if ( (grt[k] == "win") || (grt[k] == "w") ) ropt = Disp_Win;
436 else if ( (grt[k] == "same") || (grt[k] == "s") ) ropt = Disp_Same;
437 else if ( (grt[k] == "stack") || (grt[k] == "st") ) ropt = Disp_Stack;
438 else fgcont = false;
439 if (fgcont) continue;
440
441 // Si c'est une couleur
442 it = GrAcolors.find(grt[k]);
443 if (it != GrAcolors.end()) { mImgapp->SetColAtt((PIColors)((*it).second.a1)); fgsrgr = true; continue; }
444 // Si c'est un attribut de lignes
445 it = GrAlines.find(grt[k]);
446 if (it != GrAlines.end()) { mImgapp->SetLineAtt((PILineAtt)((*it).second.a1)); fgsrgr = true; continue; }
447 // Si c'est un attribut de fontes
448 it = GrAfonts.find(grt[k]);
449 if (it != GrAfonts.end()) { mImgapp->SetFontAtt((PIFontSize)((*it).second.a2), (PIFontAtt)((*it).second.a1) );
450 fgsrgr = true; continue; }
451 // Si c'est un attribut de markers
452 it = GrAmarkers.find(grt[k]);
453 if (it != GrAmarkers.end()) { mImgapp->SetMarkerAtt((*it).second.a2, (PIMarker)((*it).second.a1) );
454 fgsrgr = true; continue; }
455 // Si c'est un colormap
456 it = GrAcmap.find(grt[k]);
457 if (it != GrAcmap.end()) { mImgapp->SetColMapId( (CMapId)((*it).second.a1) ); fgsrgr = true; continue; }
458 // Si c'est un facteur de zoom
459 it = GrAzoom.find(grt[k]);
460 if (it != GrAzoom.end()) { mImgapp->SetZoomAtt( (*it).second.a1 ); fgsrgr = true; continue; }
461 // Si c'est un attribut d'axe
462 it = GrAaxes.find(grt[k]);
463 if (it != GrAaxes.end()) { mImgapp->SetAxesAtt( (*it).second.a1 ); fgsrgr = true; continue; }
464
465 }
466
467return(ropt);
468}
469
470
471
472// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
473// Initialisation des chaines de caracteres designant les attributs graphiques
474
475/* --Methode-- */
476void Services2NObjMgr::InitGrAttNames()
477{
478gratt_item gi;
479// Les couleurs
480gi.a2 = 0;
481gi.a1 = PI_NotDefColor;
482GrAcolors["defcol"] = gi;
483gi.a1 = PI_Black;
484GrAcolors["black"] = gi;
485gi.a1 = PI_White;
486GrAcolors["white"] = gi;
487gi.a1 = PI_Grey;
488GrAcolors["grey"] = gi;
489gi.a1 = PI_Red;
490GrAcolors["red"] = gi;
491gi.a1 = PI_Blue;
492GrAcolors["blue"] = gi;
493gi.a1 = PI_Green;
494GrAcolors["green"] = gi;
495gi.a1 = PI_Yellow;
496GrAcolors["yellow"] = gi;
497gi.a1 = PI_Magenta;
498GrAcolors["magenta"] = gi;
499
500gi.a1 = PI_Cyan;
501GrAcolors["cyan"] = gi;
502gi.a1 = PI_Turquoise;
503GrAcolors["turquoise"] = gi;
504gi.a1 = PI_NavyBlue;
505GrAcolors["navyblue"] = gi;
506gi.a1 = PI_Orange;
507GrAcolors["orange"] = gi;
508gi.a1 = PI_SiennaRed;
509GrAcolors["siennared"] = gi;
510gi.a1 = PI_Purple;
511GrAcolors["purple"] = gi;
512gi.a1 = PI_LimeGreen;
513GrAcolors["limegreen"] = gi;
514gi.a1 = PI_Gold;
515GrAcolors["gold"] = gi;
516
517// Les attributs de lignes
518gi.a2 = 0;
519gi.a1 = PI_NotDefLineAtt;
520GrAlines["defline"] = gi;
521gi.a1 = PI_NormalLine;
522GrAlines["normalline"] = gi;
523gi.a1 = PI_ThinLine;
524GrAlines["thinline"] = gi;
525gi.a1 = PI_ThickLine;
526GrAlines["thickline"] = gi;
527gi.a1 = PI_DashedLine;
528GrAlines["dashedline"] = gi;
529gi.a1 = PI_ThinDashedLine;
530GrAlines["thindashedline"] = gi;
531gi.a1 = PI_ThickDashedLine;
532GrAlines["thickdashedline"] = gi;
533gi.a1 = PI_DottedLine;
534GrAlines["dottedline"] = gi;
535gi.a1 = PI_ThinDottedLine;
536GrAlines["thindottedline"] = gi;
537gi.a1 = PI_ThickDottedLine;
538GrAlines["thickdottedline"] = gi;
539
540// Les fontes
541gi.a2 = PI_NotDefFontSize;
542gi.a1 = PI_NotDefFontAtt;
543GrAlines["deffont"] = gi;
544
545gi.a2 = PI_NormalSizeFont;
546gi.a1 = PI_RomanFont;
547GrAlines["normalfont"] = gi;
548gi.a1 = PI_BoldFont;
549GrAlines["boldfont"] = gi;
550gi.a1 = PI_ItalicFont;
551GrAlines["italicfont"] = gi;
552gi.a2 = PI_SmallSizeFont;
553gi.a1 = PI_RomanFont;
554GrAlines["smallfont"] = gi;
555gi.a1 = PI_BoldFont;
556GrAlines["smallboldfont"] = gi;
557gi.a1 = PI_ItalicFont;
558GrAlines["smallitalicfont"] = gi;
559gi.a2 = PI_BigSizeFont;
560gi.a1 = PI_RomanFont;
561GrAlines["bigfont"] = gi;
562gi.a1 = PI_BoldFont;
563GrAlines["bigboldfont"] = gi;
564gi.a1 = PI_ItalicFont;
565GrAlines["bigitalicfont"] = gi;
566gi.a2 = PI_HugeSizeFont;
567gi.a1 = PI_RomanFont;
568GrAlines["hugefont"] = gi;
569gi.a1 = PI_BoldFont;
570GrAlines["hugeboldfont"] = gi;
571gi.a1 = PI_ItalicFont;
572GrAlines["hugeitalicfont"] = gi;
573
574
575// Les markers
576const char* mrkn[11] = { "dotmarker", "plusmarker", "crossmarker",
577 "circlemarker", "fcirclemarker", "boxmarker", "fboxmarker",
578 "trianglemarker", "ftrianglemarker", "starmarker", "fstarmarker"};
579PIMarker mrk[11] = { PI_DotMarker, PI_PlusMarker, PI_CrossMarker,
580 PI_CircleMarker, PI_FCircleMarker, PI_BoxMarker, PI_FBoxMarker,
581 PI_TriangleMarker, PI_FTriangleMarker, PI_StarMarker, PI_FStarMarker};
582
583gi.a2 = 0;
584gi.a1 = PI_NotDefMarker;
585GrAmarkers["defmarker"] = gi;
586
587for(int j=0; j<11; j++) {
588 string smrk;
589 char buff[16];
590 for(int m=1; m<10; m+=2) {
591 sprintf(buff,"%d",m);
592 smrk = (string)mrkn[j] + (string)buff;
593 gi.a1 = mrk[j]; gi.a2 = m;
594 GrAmarkers[smrk] = gi;
595 }
596 }
597
598// Les tables de couleurs
599gi.a2 = 0;
600gi.a1 = CMAP_OTHER;
601GrAcmap["defcmap"] = gi;
602gi.a1 = CMAP_GREY32;
603GrAcmap["grey32"] = gi;
604gi.a1 = CMAP_GREYINV32;
605GrAcmap["greyinv32"] = gi;
606gi.a1 = CMAP_COLRJ32;
607GrAcmap["colrj32"] = gi;
608gi.a1 = CMAP_COLBR32;
609GrAcmap["colbr32"] = gi;
610gi.a1 = CMAP_GREY128;
611GrAcmap["grey128"] = gi;
612gi.a1 = CMAP_GREYINV128;
613GrAcmap["greyinv128"] = gi;
614gi.a1 = CMAP_COLRJ128;
615GrAcmap["colrj128"] = gi;
616gi.a1 = CMAP_COLBR128;
617GrAcmap["colbr128"] = gi;
618
619// La valeur de zoom
620gi.a2 = 0;
621gi.a1 = 0;
622GrAzoom["defzoom"] = gi;
623gi.a1 = 1;
624GrAzoom["zoomx1"] = gi;
625gi.a1 = 2;
626GrAzoom["zoomx2"] = gi;
627gi.a1 = 3;
628GrAzoom["zoomx3"] = gi;
629gi.a1 = 4;
630GrAzoom["zoomx4"] = gi;
631gi.a1 = 5;
632GrAzoom["zoomx5"] = gi;
633gi.a1 = -2;
634GrAzoom["zoom/2"] = gi;
635gi.a1 = -3;
636GrAzoom["zoom/3"] = gi;
637gi.a1 = -4;
638GrAzoom["zoom/4"] = gi;
639gi.a1 = -5;
640GrAzoom["zoom/5"] = gi;
641
642// Attributs d'axes
643gi.a2 = 0;
644gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels);
645GrAaxes["stdaxes"] = gi;
646GrAaxes["defaxes"] = gi;
647GrAaxes["boxaxes"] = gi;
648gi.a1 = (int)kAxesDflt;
649GrAaxes["simpleaxes"] = gi;
650gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels | kGridOn);
651GrAaxes["boxaxesgrid"] = gi;
652
653gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks);
654GrAaxes["fineaxes"] = gi;
655 gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks | kGridOn);
656GrAaxes["grid"] = gi;
657GrAaxes["fineaxesgrid"] = gi;
658
659}
Note: See TracBrowser for help on using the repository browser.