77 void des_equipot(
float* uutab,
int nx,
int ny,
float xmin,
float xmax,
78 float ymin,
float ymax,
int ncour,
const char* nomx,
const char* nomy,
79 const char* title,
const char* device,
int newgraph,
int nxpage,
85 float uumin = uutab[0] ;
86 float uumax = uutab[0] ;
87 for (
int i=1; i<nx*ny; i++) {
88 uumin = (uutab[i] < uumin) ? uutab[i] : uumin ;
89 uumax = (uutab[i] > uumax) ? uutab[i] : uumax ;
92 cout <<
" " << title <<
" : min, max : " << uumin <<
" " << uumax
98 float* isopot =
new float [ncour] ;
99 float hh = (uumax-uumin) /
float(ncour) ;
100 for (
int i=0; i<ncour; i++) {
101 isopot[i] = uumin + hh * float(i) ;
106 float hx = (xmax - xmin)/
float(nx-1) ;
107 float hy = (ymax - ymin)/
float(ny-1) ;
120 if ( (newgraph == 1) || (newgraph == 3) ) {
122 if (device == 0x0) device =
"?" ;
124 int ier = cpgbeg(0, device, nxpage, nypage) ;
126 cout <<
"des_equipot: problem in opening PGPLOT display !" << endl ;
132 float size = float(1.3) ;
143 cpgenv(xmin, xmax, ymin, ymax, 1, 0 ) ;
144 cpglab(nomx,nomy,title) ;
148 float dynamique = float(fabs(uumax - uumin)) ;
150 if (dynamique > 1.e-14) {
152 cpgcont(uutab, nx, ny, 1, nx, 1, ny, isopot, ncour, tr) ;
159 if ( (newgraph == 2) || (newgraph == 3) ) {
void des_equipot(float *uutab, int nx, int ny, float xmin, float xmax, float ymin, float ymax, int ncour, const char *nomx, const char *nomy, const char *title, const char *device, int newgraph, int nxpage, int nypage)
Basic routine for drawing isocontours.