PLplot  5.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
f77/sccont.c
Go to the documentation of this file.
1 // $Id: sccont.c 12095 2011-12-03 08:56:15Z andrewross $
2 //
3 // Contour plotter front-ends for Fortran.
4 //
5 // Copyright (C) 2004 Alan W. Irwin
6 //
7 // This file is part of PLplot.
8 //
9 // PLplot is free software; you can redistribute it and/or modify
10 // it under the terms of the GNU Library General Public License as published
11 // by the Free Software Foundation; either version 2 of the License, or
12 // (at your option) any later version.
13 //
14 // PLplot is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU Library General Public License for more details.
18 //
19 // You should have received a copy of the GNU Library General Public License
20 // along with PLplot; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 //
23 //
24 
25 #include "plstubs.h"
26 
27 //--------------------------------------------------------------------------
28 // pltr0f()
29 //
30 // Identity transformation for plots from Fortran.
31 // Only difference from C-language identity function (pltr0) is that the
32 // Fortran paradigm for array index is used, i.e. starting at 1.
33 //--------------------------------------------------------------------------
34 
35 void
36 pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data )
37 {
38  *tx = x + 1.0;
39  *ty = y + 1.0;
40 }
41 
42 //--------------------------------------------------------------------------
43 // Contour plotter front-ends.
44 // These specify the row-dominant function evaluator in the plfcont
45 // argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows:
46 //
47 // - plcon0 no transformation
48 // - plcon1 linear interpolation from singly dimensioned coord arrays
49 // - plcon2 linear interpolation from doubly dimensioned coord arrays
50 //
51 // The latter two work by calling plfcont() with the appropriate grid
52 // structure for input to pltr2f().
53 //--------------------------------------------------------------------------
54 
55 // no transformation
56 
57 void
58 PLCON07( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx,
59  PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel )
60 {
61  PLfGrid fgrid;
62 
63  fgrid.nx = *nx;
64  fgrid.ny = *ny;
65  fgrid.f = z;
66 
67  plfcont( plf2evalr, (void *) &fgrid,
68  *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel,
69  pltr0f, NULL );
70 }
71 
72 // 1-d transformation
73 
74 void
75 PLCON17( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx,
76  PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel,
77  PLFLT *xg, PLFLT *yg )
78 {
79  PLfGrid fgrid;
80  PLcGrid cgrid;
81 
82  fgrid.nx = *nx;
83  fgrid.ny = *ny;
84  fgrid.f = z;
85 
86  cgrid.nx = *nx;
87  cgrid.ny = *ny;
88  cgrid.xg = xg;
89  cgrid.yg = yg;
90 
91  plfcont( plf2evalr, (void *) &fgrid,
92  *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel,
93  pltr1, (void *) &cgrid );
94 }
95 
96 // 2-d transformation
97 
98 void
99 PLCON27( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx,
100  PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel,
101  PLFLT *xg, PLFLT *yg )
102 {
103  PLfGrid fgrid;
104  PLcGrid cgrid;
105 
106  fgrid.nx = *nx;
107  fgrid.ny = *ny;
108  fgrid.f = z;
109 
110  cgrid.nx = *nx;
111  cgrid.ny = *ny;
112  cgrid.xg = xg;
113  cgrid.yg = yg;
114 
115  plfcont( plf2evalr, (void *) &fgrid,
116  *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel,
117  pltr2f, (void *) &cgrid );
118 }
119 
120 //--------------------------------------------------------------------------
121 // Vector plotter front-ends.
122 // These specify the row-dominant function evaluator in the plfvect
123 // argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows:
124 //
125 // - plvec0 no transformation
126 // - plvec1 linear interpolation from singly dimensioned coord arrays
127 // - plvec2 linear interpolation from doubly dimensioned coord arrays
128 //
129 // The latter two work by calling plfvect() with the appropriate grid
130 // structure for input to pltr2f().
131 //--------------------------------------------------------------------------
132 
133 // no transformation
134 
135 void
136 PLVEC07( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale )
137 {
138  PLfGrid fgrid1, fgrid2;
139 
140  fgrid1.nx = *nx;
141  fgrid1.ny = *ny;
142  fgrid1.f = u;
143 
144  fgrid2.nx = *nx;
145  fgrid2.ny = *ny;
146  fgrid2.f = v;
147 
148  plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2,
149  *nx, *ny, *scale, pltr0f, NULL );
150 }
151 
152 // 1-d transformation
153 
154 void
155 PLVEC17( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale,
156  PLFLT *xg, PLFLT *yg )
157 {
158  PLfGrid fgrid1;
159  PLfGrid fgrid2;
160  PLcGrid cgrid;
161 
162  fgrid1.nx = *nx;
163  fgrid1.ny = *ny;
164  fgrid1.f = u;
165 
166  fgrid2.nx = *nx;
167  fgrid2.ny = *ny;
168  fgrid2.f = v;
169 
170  cgrid.nx = *nx;
171  cgrid.ny = *ny;
172  cgrid.xg = xg;
173  cgrid.yg = yg;
174 
175  plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2,
176  *nx, *ny, *scale, pltr1, (void *) &cgrid );
177 }
178 
179 // 2-d transformation
180 
181 void
182 PLVEC27( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale,
183  PLFLT *xg, PLFLT *yg )
184 {
185  PLfGrid fgrid1;
186  PLfGrid fgrid2;
187  PLcGrid cgrid;
188 
189  fgrid1.nx = *nx;
190  fgrid1.ny = *ny;
191  fgrid1.f = u;
192 
193  fgrid2.nx = *nx;
194  fgrid2.ny = *ny;
195  fgrid2.f = v;
196 
197  cgrid.nx = *nx;
198  cgrid.ny = *ny;
199  cgrid.xg = xg;
200  cgrid.yg = yg;
201 
202  plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2,
203  *nx, *ny, *scale, pltr2f, (void *) &cgrid );
204 }
205 
206 //--------------------------------------------------------------------------
207 // Here are the old contour plotters.
208 //--------------------------------------------------------------------------
209 
210 static void
211 pltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data )
212 {
213  PLFLT *tr = (PLFLT *) pltr_data;
214 
215  *tx = tr[0] * x + tr[1] * y + tr[2];
216  *ty = tr[3] * x + tr[4] * y + tr[5];
217 }
218 
219 void
220 PLCONT7( PLFLT *z, PLINT *nx, PLINT *ny, PLINT *kx, PLINT *lx,
221  PLINT *ky, PLINT *ly, PLFLT *clevel, PLINT *nlevel, PLFLT *ftr )
222 {
223  PLfGrid fgrid;
224 
225  fgrid.nx = *nx;
226  fgrid.ny = *ny;
227  fgrid.f = z;
228 
229  plfcont( plf2evalr, (void *) &fgrid,
230  *nx, *ny, *kx, *lx, *ky, *ly, clevel, *nlevel,
231  pltr, (void *) ftr );
232 }
233 
234 void
235 PLVECT7( PLFLT *u, PLFLT *v, PLINT *nx, PLINT *ny, PLFLT *scale,
236  PLFLT *ftr )
237 {
238  PLfGrid fgrid1;
239  PLfGrid fgrid2;
240 
241  fgrid1.nx = *nx;
242  fgrid1.ny = *ny;
243  fgrid1.f = u;
244 
245  fgrid2.nx = *nx;
246  fgrid2.ny = *ny;
247  fgrid2.f = v;
248 
249  plfvect( plf2evalr, (void *) &fgrid1, (void *) &fgrid2,
250  *nx, *ny, *scale,
251  pltr, (void *) ftr );
252 }
253 
254 //--------------------------------------------------------------------------
255 // plfshade front-ends.
256 // These specify the row-dominant function evaluator in the plfshade
257 // argument list. NO TRANSPOSE IS NECESSARY. The routines are as follows:
258 //
259 // - plshade0 map indices to xmin, xmax, ymin, ymax.
260 // The next two work by calling plfshade() with the appropriate grid
261 // structure for input to pltr2f().
262 // - plshade1 linear interpolation from singly dimensioned coord arrays
263 // - plshade2 linear interpolation from doubly dimensioned coord arrays
264 // - plshade tr array transformation
265 //
266 //--------------------------------------------------------------------------
267 
268 void
269 PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
271  PLFLT *shade_min, PLFLT *shade_max,
272  PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width,
273  PLINT *min_color, PLINT *min_width,
274  PLINT *max_color, PLINT *max_width, PLINT *lx )
275 {
276  PLINT rect = 1;
277 
278  PLfGrid data;
279 
280 // Fill a grid data structure to hold the fortran z array.
281  data.f = z;
282  data.nx = *lx;
283  data.ny = *ny;
284 
285 
286 // Call plfshade to do the actual work - plf2evalr is the
287 // interface that deals with the fortran data organisation
288 
289  plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny,
290  *xmin, *xmax, *ymin, *ymax,
291  *shade_min, *shade_max,
292  *sh_cmap, *sh_color, *sh_width,
293  *min_color, *min_width, *max_color, *max_width,
294  c_plfill, rect, NULL, NULL );
295 
296 // Clean up memory allocated for a
297 //
298 // plFree2dGrid( a, *nx, *ny );
299 //
300 }
301 
302 
303 // 1-d transformation
304 
305 void
306 PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
308  PLFLT *shade_min, PLFLT *shade_max,
309  PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width,
310  PLINT *min_color, PLINT *min_width,
311  PLINT *max_color, PLINT *max_width,
312  PLFLT *xg1, PLFLT *yg1, PLINT *lx )
313 {
314  PLINT rect = 1;
315  PLfGrid data;
316  PLcGrid cgrid;
317 
318 // Fill a grid data structure to hold the coordinate arrays.
319 
320  cgrid.nx = *nx;
321  cgrid.ny = *ny;
322  cgrid.xg = xg1;
323  cgrid.yg = yg1;
324 
325 // Fill a grid data structure to hold the fortran z array.
326  data.f = z;
327  data.nx = *lx;
328  data.ny = *ny;
329 
330 // Call plfshade to do the actual work - plf2evalr is the
331 // interface that deals with the fortran data organisation.
332 
333  plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny,
334  *xmin, *xmax, *ymin, *ymax,
335  *shade_min, *shade_max,
336  *sh_cmap, *sh_color, *sh_width,
337  *min_color, *min_width, *max_color, *max_width,
338  c_plfill, rect, pltr1, ( PLPointer ) & cgrid );
339 }
340 
341 // 2-d transformation
342 
343 void
344 PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
346  PLFLT *shade_min, PLFLT *shade_max,
347  PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width,
348  PLINT *min_color, PLINT *min_width,
349  PLINT *max_color, PLINT *max_width,
350  PLFLT *xg2, PLFLT *yg2, PLINT *lx )
351 {
352  PLINT rect = 0;
353  PLfGrid data;
354  PLcGrid cgrid;
355 
356 // Fill a grid data structure to hold the coordinate arrays.
357  cgrid.nx = *lx;
358  cgrid.ny = *ny;
359  cgrid.xg = xg2;
360  cgrid.yg = yg2;
361 
362 // Fill a grid data structure to hold the fortran z array.
363  data.f = z;
364  data.nx = *lx;
365  data.ny = *ny;
366 
367 // Call plfshade to do the actual work - plf2evalr is the
368 // interface that deals with the fortran data organisation.
369 
370  plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny,
371  *xmin, *xmax, *ymin, *ymax,
372  *shade_min, *shade_max,
373  *sh_cmap, *sh_color, *sh_width,
374  *min_color, *min_width, *max_color, *max_width,
375  c_plfill, rect, pltr2f, ( PLPointer ) & cgrid );
376 }
377 
378 void
379 PLSHADE7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
381  PLFLT *shade_min, PLFLT *shade_max,
382  PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width,
383  PLINT *min_color, PLINT *min_width,
384  PLINT *max_color, PLINT *max_width, PLFLT *ftr, PLINT *lx )
385 {
386  PLINT rect = 1;
387  PLfGrid data;
388 
389 // Fill a grid data structure to hold the fortran z array.
390  data.f = z;
391  data.nx = *lx;
392  data.ny = *ny;
393 
394 // Call plfshade to do the actual work - plf2evalr is the
395 // interface that deals with the fortran data organisation.
396 
397  plfshade( plf2evalr, &data, NULL, NULL, *nx, *ny,
398  *xmin, *xmax, *ymin, *ymax,
399  *shade_min, *shade_max,
400  *sh_cmap, *sh_color, *sh_width,
401  *min_color, *min_width, *max_color, *max_width,
402  c_plfill, rect, pltr, (PLPointer) ftr );
403 }
404 
405 //--------------------------------------------------------------------------
406 // plshades front-ends.
407 //
408 // - plshades0 map indices to xmin, xmax, ymin, ymax
409 // - plshades1 linear interpolation from singly dimensioned coord arrays
410 // - plshades2 linear interpolation from doubly dimensioned coord arrays
411 // - plshades pass tr information with plplot common block (and
412 // then pass tr as last argument of PLSHADES7)
413 //--------------------------------------------------------------------------
414 
415 void
416 PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
418  PLFLT *clevel, PLINT *nlevel, PLINT *fill_width,
420 {
421  PLINT rect = 1;
422  PLfGrid2 data;
423 
424 // Fill a grid data structure to hold the fortran z array.
425  data.f = (PLFLT **) z;
426  data.nx = *lx;
427  data.ny = *ny;
428 
429 // Call plfshades to do the actual work - plf2ops_col_major() returns a collection
430 // of functions to access the data in fortran style.
431  plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL,
432  *xmin, *xmax, *ymin, *ymax,
433  clevel, *nlevel, *fill_width,
434  *cont_color, *cont_width,
435  c_plfill, rect, NULL, NULL );
436 }
437 
438 void
439 PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
441  PLFLT *clevel, PLINT *nlevel, PLINT *fill_width,
443  PLFLT *xg1, PLFLT *yg1, PLINT *lx )
444 {
445  PLINT rect = 1;
446  PLfGrid2 data;
447  PLcGrid cgrid;
448 
449 // Fill a grid data structure to hold the fortran z array.
450  data.f = (PLFLT **) z;
451  data.nx = *lx;
452  data.ny = *ny;
453 
454 // Fill a grid data structure to hold the coordinate arrays.
455  cgrid.nx = *nx;
456  cgrid.ny = *ny;
457  cgrid.xg = xg1;
458  cgrid.yg = yg1;
459 
460 // Call plfshades to do the actual work - plf2ops_col_major() returns a collection
461 // of functions to access the data in fortran style.
462  plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL,
463  *xmin, *xmax, *ymin, *ymax,
464  clevel, *nlevel, *fill_width,
465  *cont_color, *cont_width,
466  c_plfill, rect, pltr1, ( PLPointer ) & cgrid );
467 }
468 
469 void
470 PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
472  PLFLT *clevel, PLINT *nlevel, PLINT *fill_width,
474  PLFLT *xg2, PLFLT *yg2, PLINT *lx )
475 {
476  PLINT rect = 0;
477  PLfGrid2 data;
478  PLcGrid cgrid;
479 
480 // Fill a grid data structure to hold the fortran z array.
481  data.f = (PLFLT **) z;
482  data.nx = *lx;
483  data.ny = *ny;
484 
485 // Fill a grid data structure to hold the coordinate arrays.
486  cgrid.nx = *lx;
487  cgrid.ny = *ny;
488  cgrid.xg = xg2;
489  cgrid.yg = yg2;
490 
491 // Call plfshades to do the actual work - plf2ops_col_major() returns a collection
492 // of functions to access the data in fortran style.
493  plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL,
494  *xmin, *xmax, *ymin, *ymax,
495  clevel, *nlevel, *fill_width,
496  *cont_color, *cont_width,
497  c_plfill, rect, pltr2f, ( PLPointer ) & cgrid );
498 }
499 
500 void
501 PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined,
503  PLFLT *clevel, PLINT *nlevel, PLINT *fill_width,
504  PLINT *cont_color, PLINT *cont_width, PLFLT *ftr, PLINT *lx )
505 {
506  PLINT rect = 1;
507  PLfGrid2 data;
508 
509 // Fill a grid data structure to hold the fortran z array.
510  data.f = (PLFLT **) z;
511  data.nx = *lx;
512  data.ny = *ny;
513 
514 // Call plfshades to do the actual work - plf2ops_col_major() returns a collection
515 // of functions to access the data in fortran style.
516  plfshades( plf2ops_grid_col_major(), &data, *nx, *ny, NULL,
517  *xmin, *xmax, *ymin, *ymax,
518  clevel, *nlevel, *fill_width,
519  *cont_color, *cont_width,
520  c_plfill, rect, pltr, (void *) ftr );
521 }
522 
523 void
524 PLGRIDDATA( PLFLT *x, PLFLT *y, PLFLT *z, PLINT *npts,
525  PLFLT *xg, PLINT *nptsx, PLFLT *yg, PLINT *nptsy,
526  PLFLT *zg, PLINT *type, PLFLT *data, PLINT *lx )
527 {
528  PLFLT **a;
529  int i, j;
530 
531  plAlloc2dGrid( &a, *nptsx, *nptsy );
532 
533  c_plgriddata( x, y, z, *npts,
534  xg, *nptsx, yg, *nptsy,
535  a, *type, *data );
536 
537  for ( i = 0; i < *nptsx; i++ )
538  {
539  for ( j = 0; j < *nptsy; j++ )
540  {
541  zg[i + j * *lx] = a[i][j];
542  }
543  }
544 
545 // Clean up memory allocated for a
546  plFree2dGrid( a, *nptsx, *nptsy );
547 }
548 
549 void
552  PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax,
553  PLINT *lx )
554 {
555  int i, j;
556  PLFLT **pidata;
557 
558  plAlloc2dGrid( &pidata, *nx, *ny );
559 
560  for ( i = 0; i < *nx; i++ )
561  {
562  for ( j = 0; j < *ny; j++ )
563  {
564  pidata[i][j] = idata[i + j * ( *lx )];
565  }
566  }
567 
568  c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny,
569  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
570  *valuemin, *valuemax, pltr0, NULL );
571 
572  plFree2dGrid( pidata, *nx, *ny );
573 }
574 
575 void
578  PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax,
579  PLFLT *xg, PLFLT *yg, PLINT *lx )
580 {
581  int i, j;
582  PLFLT **pidata;
583  PLcGrid cgrid;
584 
585  plAlloc2dGrid( &pidata, *nx, *ny );
586 
587  cgrid.nx = ( *nx ) + 1;
588  cgrid.ny = ( *ny ) + 1;
589  cgrid.xg = xg;
590  cgrid.yg = yg;
591 
592  for ( i = 0; i < *nx; i++ )
593  {
594  for ( j = 0; j < *ny; j++ )
595  {
596  pidata[i][j] = idata[i + j * ( *lx )];
597  }
598  }
599 
600  c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny,
601  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
602  *valuemin, *valuemax, pltr1, (void *) &cgrid );
603 
604  plFree2dGrid( pidata, *nx, *ny );
605 }
606 
607 void
610  PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax,
611  PLFLT *xg, PLFLT *yg, PLINT *lx )
612 {
613  int i, j;
614  PLFLT **pidata;
615  PLcGrid2 cgrid2;
616 
617  plAlloc2dGrid( &pidata, *nx, *ny );
618  plAlloc2dGrid( &cgrid2.xg, ( *nx ) + 1, ( *ny ) + 1 );
619  plAlloc2dGrid( &cgrid2.yg, ( *nx ) + 1, ( *ny ) + 1 );
620 
621  cgrid2.nx = ( *nx ) + 1;
622  cgrid2.ny = ( *ny ) + 1;
623  for ( i = 0; i <= *nx; i++ )
624  {
625  for ( j = 0; j <= *ny; j++ )
626  {
627  cgrid2.xg[i][j] = xg[i + j * ( ( *lx ) + 1 )];
628  cgrid2.yg[i][j] = yg[i + j * ( ( *lx ) + 1 )];
629  }
630  }
631 
632  for ( i = 0; i < *nx; i++ )
633  {
634  for ( j = 0; j < *ny; j++ )
635  {
636  pidata[i][j] = idata[i + j * ( *lx )];
637  }
638  }
639 
640  c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny,
641  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
642  *valuemin, *valuemax, pltr2, (void *) &cgrid2 );
643 
644  plFree2dGrid( pidata, *nx, *ny );
645  plFree2dGrid( cgrid2.xg, ( *nx ) + 1, ( *ny ) + 1 );
646  plFree2dGrid( cgrid2.yg, ( *nx ) + 1, ( *ny ) + 1 );
647 }
648 
649 void
652  PLFLT *zmin, PLFLT *zmax, PLFLT *valuemin, PLFLT *valuemax,
653  PLFLT *ftr, PLINT *lx )
654 {
655  int i, j;
656  PLFLT **pidata;
657 
658  plAlloc2dGrid( &pidata, *nx, *ny );
659 
660  for ( i = 0; i < *nx; i++ )
661  {
662  for ( j = 0; j < *ny; j++ )
663  {
664  pidata[i][j] = idata[i + j * ( *lx )];
665  }
666  }
667 
668  c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny,
669  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
670  *valuemin, *valuemax, pltr, (void *) ftr );
671 
672  plFree2dGrid( pidata, *nx, *ny );
673 }