1
!***********************************************************************
2
! $Id: sfstubs.f90,v 1.3 2006/05/19 09:57:07 arjenmarkus Exp $
5
! Copyright (C) 2004 Alan W. Irwin
7
! This file is part of PLplot.
9
! PLplot is free software; you can redistribute it and/or modify
10
! it under the terms of the GNU General Library Public License as published
11
! by the Free Software Foundation; either version 2 of the License, or
12
! (at your option) any later version.
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.
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
24
! This file contains the more complicated fortran stub routines
25
! that the more generic scstubs.c cannot handle.
26
! Typical stubs here must convert a fortran character string
28
! N.B. the called routines (that are defined in scstubs.c) have
29
! a suffix of '7' to avoid name clashes and also presumably as a
30
! signal in scstubs.c that they were called from these routines.
31
! Where arguments are floating-point we explicitly type them as real(kind=plflt).
32
! This typing is never used since these arguments are
33
! actually passed by reference. That implies these routines should
34
! work if the calling routine and libplplot itself are both
35
! double precision or both single precision.
37
!***********************************************************************
39
subroutine plsetopt(opt, optarg)
42
character*(*) opt, optarg
46
call plstrf2c(opt, string1, maxlen)
47
call plstrf2c(optarg, string2, maxlen)
48
call plsetopt7(s1, s2)
52
!***********************************************************************
54
subroutine plsdev(dnam)
61
call plstrf2c(dnam, string1, maxlen)
66
!***********************************************************************
68
subroutine plgdev(dnam)
76
call plstrc2f(string1, dnam)
80
!***********************************************************************
82
subroutine plsfnam(fnam)
89
call plstrf2c(fnam, string1, maxlen)
94
!***********************************************************************
96
subroutine plgfnam(fnam)
103
call plgfnam7(string1)
104
call plstrc2f(string1, fnam)
108
!***********************************************************************
110
subroutine plgver(ver)
118
call plstrc2f(string1, ver)
122
!***********************************************************************
124
subroutine plaxes(x0,y0,xopt,xtick,nxsub,yopt,ytick,nysub)
127
real(kind=plflt) x0, y0, xtick, ytick
129
character*(*) xopt,yopt
133
call plstrf2c(xopt, string1, maxlen)
134
call plstrf2c(yopt, string2, maxlen)
136
call plaxes7(x0,y0,s1,xtick,nxsub,s2,ytick,nysub)
140
!***********************************************************************
142
subroutine plbox(xopt,xtick,nxsub,yopt,ytick,nysub)
145
real(kind=plflt) xtick, ytick
147
character*(*) xopt,yopt
151
call plstrf2c(xopt, string1, maxlen)
152
call plstrf2c(yopt, string2, maxlen)
154
call plbox7(s1,xtick,nxsub,s2,ytick,nysub)
158
!***********************************************************************
160
subroutine plbox3(xopt,xlabel,xtick,nxsub,yopt,ylabel,ytick,nysub, &
161
zopt,zlabel,ztick,nzsub)
164
real(kind=plflt) xtick, ytick, ztick
165
character*(*) xopt,xlabel,yopt,ylabel,zopt,zlabel
166
integer nxsub, nysub, nzsub
170
call plstrf2c(xopt, string1, maxlen)
171
call plstrf2c(xlabel, string2, maxlen)
172
call plstrf2c(yopt, string3, maxlen)
173
call plstrf2c(ylabel, string4, maxlen)
174
call plstrf2c(zopt, string5, maxlen)
175
call plstrf2c(zlabel, string6, maxlen)
177
call plbox37(s1,s2,xtick,nxsub, &
183
!***********************************************************************
185
subroutine plcontour_0(z,kx,lx,ky,ly,clevel)
188
integer kx, lx, ky, ly
189
real(kind=plflt) z(:,:), clevel(:)
191
call plcon07(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel))
195
!***********************************************************************
197
subroutine plcontour_1(z,kx,lx,ky,ly,clevel,xg,yg)
200
integer kx, lx, ky, ly
201
real(kind=plflt) z(:,:), xg(:), yg(:), clevel(:)
203
call plcon17(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel),xg,yg)
207
!***********************************************************************
209
subroutine plcontour_2(z,kx,lx,ky,ly,clevel,xg,yg)
212
integer kx, lx, ky, ly
213
real(kind=plflt) z(:,:), xg(:,:), yg(:,:), clevel(:)
215
call plcon27(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel),xg,yg)
219
!***********************************************************************
221
subroutine plcontour_tr(z,kx,lx,ky,ly,clevel,tr)
224
integer kx, lx, ky, ly
225
real(kind=plflt) z(:,:), clevel(:)
226
real(kind=plflt) tr(6)
228
call plcont7(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel),tr)
232
!***********************************************************************
234
subroutine plcontour_0_all(z,clevel)
237
integer kx, lx, ky, ly
238
real(kind=plflt) z(:,:), clevel(:)
244
call plcon07(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel))
248
!***********************************************************************
250
subroutine plcontour_1_all(z,clevel,xg,yg)
253
integer kx, lx, ky, ly
254
real(kind=plflt) z(:,:), xg(:), yg(:), clevel(:)
260
call plcon17(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel),xg,yg)
264
!***********************************************************************
266
subroutine plcontour_2_all(z,clevel,xg,yg)
269
integer kx, lx, ky, ly
270
real(kind=plflt) z(:,:), xg(:,:), yg(:,:), clevel(:)
276
call plcon27(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel),xg,yg)
280
!***********************************************************************
282
subroutine plcontour_tr_all(z,clevel,tr)
285
integer kx, lx, ky, ly
286
real(kind=plflt) z(:,:), clevel(:)
287
real(kind=plflt) tr(6)
293
call plcont7(z,size(z,1),size(z,2),kx,lx,ky,ly,clevel,size(clevel),tr)
297
!***********************************************************************
299
subroutine plvectors_0(u, v, scale)
302
real(kind=plflt) u(:,:), v(:,:), scale
304
call plvec07(u,v,size(u,1),size(u,2),scale)
308
!***********************************************************************
310
subroutine plvectors_1(u, v, scale, xg, yg)
313
real(kind=plflt) u(:,:), v(:,:), xg(:), yg(:), scale
315
call plvec17(u,v,size(u,1),size(u,2),scale,xg,yg)
319
!***********************************************************************
321
subroutine plvectors_2(u, v, scale, xg, yg)
324
real(kind=plflt) u(:,:), v(:,:), xg(:,:), yg(:,:), &
327
call plvec27(u,v,size(u,1),size(u,2),scale,xg,yg)
331
!***********************************************************************
333
subroutine plvectors_tr(u, v, scale, tr)
336
real(kind=plflt) u(:,:), v(:,:), scale
337
real(kind=plflt) tr(6)
339
call plvect7(u,v,size(u,1),size(u,2),scale,tr)
343
!***********************************************************************
345
subroutine plshade_single_0(z, defined, &
346
xmin, xmax, ymin, ymax, &
347
shade_min, shade_max, &
348
sh_cmap, sh_color, sh_width, &
349
min_color, min_width, max_color, max_width)
352
character defined*(*)
353
integer sh_cmap, sh_width
354
integer min_color, min_width, max_color, max_width
355
real(kind=plflt) shade_min, shade_max, sh_color
356
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax
360
! call plstrf2c(dnam, string1, maxlen)
362
call plshade07(z, size(z,1), size(z,2), s1, &
363
xmin, xmax, ymin, ymax, &
364
shade_min, shade_max, &
365
sh_cmap, sh_color, sh_width, &
366
min_color, min_width, max_color, max_width, size(z,1))
370
!***********************************************************************
372
subroutine plshade_single_1(z, defined, &
373
xmin, xmax, ymin, ymax, &
374
shade_min, shade_max, &
375
sh_cmap, sh_color, sh_width, &
376
min_color, min_width, max_color, max_width, &
380
character defined*(*)
381
integer sh_cmap, sh_width
382
integer min_color, min_width, max_color, max_width
383
real(kind=plflt) shade_min, shade_max, sh_color
384
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, xg(:), yg(:)
388
! call plstrf2c(dnam, string1, maxlen)
390
call plshade17(z, size(z,1), size(z,2), s1, &
391
xmin, xmax, ymin, ymax, &
392
shade_min, shade_max, &
393
sh_cmap, sh_color, sh_width, &
394
min_color, min_width, max_color, max_width, &
399
!***********************************************************************
401
subroutine plshade_single_2(z, defined, &
402
xmin, xmax, ymin, ymax, &
403
shade_min, shade_max, &
404
sh_cmap, sh_color, sh_width, &
405
min_color, min_width, max_color, max_width, &
409
character defined*(*)
410
integer sh_cmap, sh_width
411
integer min_color, min_width, max_color, max_width
412
real(kind=plflt) shade_min, shade_max, sh_color
413
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, xg(:,:), yg(:,:)
417
! call plstrf2c(dnam, string1, maxlen)
419
call plshade27(z, size(z,1), size(z,2), s1, &
420
xmin, xmax, ymin, ymax, &
421
shade_min, shade_max, &
422
sh_cmap, sh_color, sh_width, &
423
min_color, min_width, max_color, max_width, &
428
!***********************************************************************
430
subroutine plshade_single_tr(z, defined, &
431
xmin, xmax, ymin, ymax, &
432
shade_min, shade_max, &
433
sh_cmap, sh_color, sh_width, &
434
min_color, min_width, max_color, max_width, tr)
437
character(len=*) defined
438
integer sh_cmap, sh_width
439
integer min_color, min_width, max_color, max_width
440
real(kind=plflt) shade_min, shade_max, sh_color
441
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax
442
real(kind=plflt) tr(6)
446
call plshade7(z, size(z,1), size(z,2), s1, &
447
xmin, xmax, ymin, ymax, &
448
shade_min, shade_max, &
449
sh_cmap, sh_color, sh_width, &
450
min_color, min_width, max_color, max_width, tr, size(z,1))
454
!***********************************************************************
456
subroutine plshades_multiple_0(z, defined, &
457
xmin, xmax, ymin, ymax, &
458
clevel, fill_width, &
459
cont_color, cont_width )
462
character defined*(*)
463
integer fill_width, cont_color, cont_width
464
real(kind=plflt) clevel(:)
465
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax
469
! call plstrf2c(dnam, string1, maxlen)
471
call plshades07(z, size(z,1), size(z,2), s1, &
472
xmin, xmax, ymin, ymax, &
473
clevel, size(clevel), fill_width, &
474
cont_color, cont_width, size(z,1))
478
!***********************************************************************
480
subroutine plshades_multiple_1(z, defined, &
481
xmin, xmax, ymin, ymax, &
482
clevel, fill_width, &
483
cont_color, cont_width, xg1, yg1)
486
character defined*(*)
487
integer fill_width, cont_color, cont_width
488
real(kind=plflt) clevel(:)
489
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, &
494
! call plstrf2c(dnam, string1, maxlen)
496
call plshades17(z, size(z,1), size(z,2), s1, &
497
xmin, xmax, ymin, ymax, &
498
clevel, size(clevel), fill_width, &
499
cont_color, cont_width, xg1, yg1, size(z,1))
503
!***********************************************************************
505
subroutine plshades_multiple_2(z, defined, &
506
xmin, xmax, ymin, ymax, &
507
clevel, fill_width, &
508
cont_color, cont_width, xg2, yg2)
511
character defined*(*)
512
integer fill_width, cont_color, cont_width
513
real(kind=plflt) clevel(:)
514
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax, &
519
! call plstrf2c(dnam, string1, maxlen)
521
call plshades27(z, size(z,1), size(z,2), s1, &
522
xmin, xmax, ymin, ymax, &
523
clevel, size(clevel), fill_width, &
524
cont_color, cont_width, xg2, yg2, size(z,1))
528
!***********************************************************************
530
subroutine plshades_multiple_tr(z, defined, &
531
xmin, xmax, ymin, ymax, &
532
clevel, fill_width, &
533
cont_color, cont_width, tr)
536
character defined*(*)
537
integer fill_width, cont_color, cont_width
538
real(kind=plflt) clevel(:)
539
real(kind=plflt) z(:,:), xmin, xmax, ymin, ymax
540
real(kind=plflt) tr(6)
544
! call plstrf2c(dnam, string1, maxlen)
546
call plshades7(z, size(z,1), size(z,2), s1, &
547
xmin, xmax, ymin, ymax, &
548
clevel, size(clevel), fill_width, &
549
cont_color, cont_width, tr, size(z,1))
553
!***********************************************************************
555
subroutine pllab(xlab,ylab,title)
558
character*(*) xlab,ylab,title
562
call plstrf2c(xlab, string1, maxlen)
563
call plstrf2c(ylab, string2, maxlen)
564
call plstrf2c(title, string3, maxlen)
566
call pllab7(s1,s2,s3)
570
!***********************************************************************
572
subroutine plmtex(side,disp,pos,xjust,text)
575
real(kind=plflt) disp, pos, xjust
576
character*(*) side, text
580
call plstrf2c(side, string1, maxlen)
581
call plstrf2c(text, string2, maxlen)
583
call plmtex7(s1,disp,pos,xjust,s2)
587
!***********************************************************************
589
subroutine plptex(x,y,dx,dy,xjust,text)
592
real(kind=plflt) x, y, dx, dy, xjust
597
call plstrf2c(text, string1, maxlen)
599
call plptex7(x,y,dx,dy,xjust,s1)
603
!***********************************************************************
605
subroutine plstart(devname, nx, ny)
608
character*(*) devname
613
call plstrf2c(devname, string1, maxlen)
615
call plstart7(s1, nx, ny)
619
!***********************************************************************
621
subroutine plmap(mapform,mapname,minx,maxx,miny,maxy)
624
real(kind=plflt) minx, maxx, miny, maxy
625
character*(*) mapname
630
call plstrf2c(mapname, string1, maxlen)
632
call plsetmapformc(mapform)
633
call plmapc(s1,minx,maxx,miny,maxy)
637
!***********************************************************************
639
subroutine plmeridians(mapform,dlong,dlat,minlong,maxlong, &
643
real(kind=plflt) dlong, dlat, minlong, maxlong, minlat, maxlat
648
call plsetmapformc(mapform)
649
call plmeridiansc(dlong,dlat,minlong,maxlong,minlat,maxlat)