Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

zzaxyy.c File Reference

#include "f2c.h"

Go to the source code of this file.


Defines

#define zzzplt_1   zzzplt_
#define zzpltr_1   zzpltr_
#define buf10   (equiv_0)
#define buf   (equiv_0)

Functions

int zzaxyy_ (real *x, real *y1, real *y2, integer *iside, integer *ilab)

Variables

struct {
   real   xpgmin
   real   ypgmin
   real   xpgmax
   real   ypgmax
   real   xclbot
   real   yclbot
   real   xcltop
   real   ycltop
   real   xbot
   real   ybot
   real   xtop
   real   ytop
   real   xmin
   real   ymin
   real   xmax
   real   ymax
   integer   ixcoor
   integer   iycoor
   real   alphxx
   real   betaxx
   real   alphyy
   real   betayy
   real   tmajx
   real   tminx
   real   tmajy
   real   tminy
   integer   majrx
   integer   minrx
   integer   majry
   integer   minry
   integer   isizx
   integer   isizy
   real   xphold
   real   yphold
zzzplt_
struct {
   real   xphmax
   real   yphmax
   integer   ixpmax
   integer   iypmax
   real   xpscal
   real   ypscal
   integer   iflip
   integer   nplotr
   char   cfile [64]
zzpltr_
integer c__1 = 1
integer c__0 = 0

Define Documentation

#define buf   (equiv_0)
 

#define buf10   (equiv_0)
 

#define zzpltr_1   zzpltr_
 

Definition at line 29 of file zzaxyy.c.

#define zzzplt_1   zzzplt_
 

Definition at line 19 of file zzaxyy.c.

Referenced by zzaxyy_().


Function Documentation

int zzaxyy_ real   x,
real   y1,
real   y2,
integer   iside,
integer   ilab
 

Definition at line 39 of file zzaxyy.c.

References abs, c__0, c__1, dabs, dmax, dmin, do_fio(), e_wsfi(), L, max, pwritf_(), s_wsfi(), y1, zzlabl_(), zzlgin_(), zzliny_(), zzlogy_(), zzphys_(), and zzzplt_1.

Referenced by zzperi_().

00041 {
00042     /* Format strings */
00043     static char fmt_101[] = "(\0021.E\002,i2)";
00044     static char fmt_102[] = "(\0021.E\002,i3)";
00045 
00046     /* System generated locals */
00047     integer i__1, i__2, i__3;
00048     real r__1, r__2;
00049     static char equiv_0[10];
00050 
00051     /* Builtin functions */
00052     integer s_wsfi(icilist *), do_fio(integer *, char *, ftnlen), e_wsfi(void)
00053             ;
00054 
00055     /* Local variables */
00056     static integer ndec, nlab;
00057 #define buf10 (equiv_0)
00058     static real xlab, temp;
00059     static integer nchar;
00060     static real dylab, csize, dycsz;
00061     static integer il;
00062     static real yv, xx, yy;
00063     extern /* Subroutine */ int zzlgin_(real *, real *, integer *);
00064     static integer nl1, nl2, npower, nshift;
00065     extern /* Subroutine */ int zzlabl_(real *, char *, integer *, ftnlen), 
00066             pwritf_(real *, real *, char *, integer *, integer *, integer *, 
00067             integer *, ftnlen), zzlogy_(real *, real *, real *, integer *, 
00068             real *, real *), zzliny_(real *, real *, real *, integer *, real *
00069             , integer *, real *);
00070     static real yv1, yv2, yy1, yy2;
00071     extern /* Subroutine */ int zzphys_(real *, real *);
00072 #define buf (equiv_0)
00073     static real dyv;
00074 
00075     /* Fortran I/O blocks */
00076     static icilist io___23 = { 0, buf10, 0, fmt_101, 10, 1 };
00077     static icilist io___24 = { 0, buf10, 0, fmt_102, 10, 1 };
00078 
00079 
00080 
00081 /*  Draw an axis in the y-direction from (X,Y1) to (X,Y2)  [user coords] 
00082 */
00083 /*  with the specified divisions and tics.  If ISIDE is positive, the */
00084 /*  tic marks appear in the +x direction and the labels in the -x */
00085 /*  direction from the axis.  If ILAB = 0, no labels are drawn. */
00086 /* .......................................................................
00087  */
00088 
00089 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00090  */
00091 
00092 /*  Internal Data for PLOTPAK */
00093 
00094     if (*y1 == *y2) {
00095         goto L8000;
00096     }
00097 
00098     yv1 = dmin(*y1,*y2);
00099     yv2 = dmax(*y1,*y2);
00100 
00101 /*  For log y-axis, must push lower value of Y down and upper value of */
00102 /*  Y up to powers of 10. */
00103 
00104     if (zzzplt_1.iycoor < 0) {
00105         zzlgin_(&yv1, &yv1, &nl1);
00106         temp = yv2;
00107         zzlgin_(&temp, &yv2, &nl2);
00108         if (yv2 <= temp * .999f) {
00109             yv2 *= 10.f;
00110             ++nl2;
00111         }
00112         ndec = nl2 - nl1;
00113         if (ndec <= 0) {
00114             goto L8000;
00115         }
00116     }
00117 /* .......................................................................
00118  */
00119 /*  Convert to physical coordinates and plot axes */
00120 
00121     yy1 = yv1;
00122     yy2 = yv2;
00123     xx = *x;
00124     zzphys_(&temp, &yy1);
00125     zzphys_(&xx, &yy2);
00126 
00127     if (zzzplt_1.iycoor >= 0) {
00128         r__1 = *iside * zzzplt_1.tmajy;
00129         r__2 = *iside * zzzplt_1.tminy;
00130         zzliny_(&xx, &yy1, &yy2, &zzzplt_1.majry, &r__1, &zzzplt_1.minry, &
00131                 r__2);
00132     } else {
00133         r__1 = *iside * zzzplt_1.tmajy;
00134         r__2 = *iside * zzzplt_1.tminy;
00135         zzlogy_(&xx, &yy1, &yy2, &ndec, &r__1, &r__2);
00136     }
00137 /* .......................................................................
00138  */
00139 /*  Plot labels */
00140 
00141     if (*ilab == 0) {
00142         goto L8000;
00143     }
00144 
00145     if (zzzplt_1.iycoor >= 0) {
00146         nlab = zzzplt_1.majry;
00147     } else {
00148         nlab = ndec;
00149     }
00150 
00151 /*  Calculate the max number of characters needed for labels into NSHIFT. 
00152 */
00153 
00154     if (zzzplt_1.iycoor < 0) {
00155 /*  Log-axis:  1.E+x or 1.E+xx are the possibilities */
00156 /* Computing MAX */
00157         i__1 = abs(nl1), i__2 = abs(nl2);
00158         npower = max(i__1,i__2);
00159         if (npower < 10) {
00160             nshift = 5;
00161         } else {
00162             nshift = 6;
00163         }
00164     } else {
00165 /*  Linear-axis:  calculate all labels and find the longest */
00166         nshift = 1;
00167         dyv = (yv2 - yv1) / nlab;
00168         i__1 = nlab;
00169         for (il = 0; il <= i__1; ++il) {
00170             yv = yv1 + il * dyv;
00171 /* Computing MIN */
00172             r__1 = dabs(yv1), r__2 = dabs(yv2);
00173             if (dabs(yv) <= dmin(r__1,r__2) * 1e-5f) {
00174                 yv = 0.f;
00175             }
00176             zzlabl_(&yv, buf, &nchar, 1L);
00177             nshift = max(nshift,nchar);
00178 /* L50: */
00179         }
00180     }
00181 
00182     dylab = (yy2 - yy1) / nlab;
00183     csize = zzzplt_1.isizy * .0011f * (zzzplt_1.xpgmax - zzzplt_1.xpgmin);
00184     xlab = xx - csize * *iside * nshift;
00185     dycsz = csize * .5f;
00186     if (dylab < 0.f) {
00187         dycsz = -dycsz;
00188     }
00189 
00190     i__1 = nlab;
00191     for (il = 0; il <= i__1; ++il) {
00192         if (zzzplt_1.iycoor >= 0) {
00193             yv = yv1 + il * dyv;
00194 /* Computing MIN */
00195             r__1 = dabs(yv1), r__2 = dabs(yv2);
00196             if (dabs(yv) <= dmin(r__1,r__2) * 1e-5f) {
00197                 yv = 0.f;
00198             }
00199             zzlabl_(&yv, buf, &nchar, 1L);
00200         } else {
00201             npower = nl1 + il;
00202             if (abs(npower) < 10) {
00203                 s_wsfi(&io___23);
00204                 do_fio(&c__1, (char *)&npower, (ftnlen)sizeof(integer));
00205                 e_wsfi();
00206                 nchar = 5;
00207             } else {
00208                 s_wsfi(&io___24);
00209                 do_fio(&c__1, (char *)&npower, (ftnlen)sizeof(integer));
00210                 e_wsfi();
00211                 nchar = 6;
00212             }
00213             if (*(unsigned char *)&buf[3] == ' ') {
00214                 *(unsigned char *)&buf[3] = '+';
00215             }
00216         }
00217         if (il == 0) {
00218             yy = yy1 + dycsz;
00219         } else {
00220             yy = yy1 + il * dylab;
00221             if (il == nlab) {
00222                 yy -= dycsz;
00223             }
00224         }
00225         i__2 = -nchar;
00226         i__3 = -(*iside);
00227         pwritf_(&xlab, &yy, buf, &i__2, &zzzplt_1.isizy, &c__0, &i__3, 1L);
00228 /* L100: */
00229     }
00230 /* .......................................................................
00231  */
00232 L8000:
00233     return 0;
00234 } /* zzaxyy_ */

Variable Documentation

real alphxx
 

Definition at line 14 of file zzaxyy.c.

real alphyy
 

Definition at line 14 of file zzaxyy.c.

real betaxx
 

Definition at line 14 of file zzaxyy.c.

real betayy
 

Definition at line 14 of file zzaxyy.c.

integer c__0 = 0 [static]
 

Definition at line 34 of file zzaxyy.c.

Referenced by zzaxyy_().

integer c__1 = 1 [static]
 

Definition at line 33 of file zzaxyy.c.

Referenced by zzaxyy_().

char cfile[64]
 

Definition at line 26 of file zzaxyy.c.

integer iflip
 

Definition at line 25 of file zzaxyy.c.

integer isizx
 

Definition at line 15 of file zzaxyy.c.

integer isizy
 

Definition at line 15 of file zzaxyy.c.

integer ixcoor
 

Definition at line 13 of file zzaxyy.c.

integer ixpmax
 

Definition at line 23 of file zzaxyy.c.

integer iycoor
 

Definition at line 13 of file zzaxyy.c.

integer iypmax
 

Definition at line 23 of file zzaxyy.c.

integer majrx
 

Definition at line 15 of file zzaxyy.c.

integer majry
 

Definition at line 15 of file zzaxyy.c.

integer minrx
 

Definition at line 15 of file zzaxyy.c.

integer minry
 

Definition at line 15 of file zzaxyy.c.

integer nplotr
 

Definition at line 25 of file zzaxyy.c.

real tmajx
 

Definition at line 14 of file zzaxyy.c.

real tmajy
 

Definition at line 14 of file zzaxyy.c.

real tminx
 

Definition at line 14 of file zzaxyy.c.

real tminy
 

Definition at line 14 of file zzaxyy.c.

real xbot
 

Definition at line 11 of file zzaxyy.c.

real xclbot
 

Definition at line 11 of file zzaxyy.c.

real xcltop
 

Definition at line 11 of file zzaxyy.c.

real xmax
 

Definition at line 11 of file zzaxyy.c.

real xmin
 

Definition at line 11 of file zzaxyy.c.

real xpgmax
 

Definition at line 11 of file zzaxyy.c.

real xpgmin
 

Definition at line 11 of file zzaxyy.c.

real xphmax
 

Definition at line 22 of file zzaxyy.c.

real xphold
 

Definition at line 16 of file zzaxyy.c.

real xpscal
 

Definition at line 24 of file zzaxyy.c.

real xtop
 

Definition at line 11 of file zzaxyy.c.

real ybot
 

Definition at line 11 of file zzaxyy.c.

real yclbot
 

Definition at line 11 of file zzaxyy.c.

real ycltop
 

Definition at line 11 of file zzaxyy.c.

real ymax
 

Definition at line 11 of file zzaxyy.c.

real ymin
 

Definition at line 11 of file zzaxyy.c.

real ypgmax
 

Definition at line 11 of file zzaxyy.c.

real ypgmin
 

Definition at line 11 of file zzaxyy.c.

real yphmax
 

Definition at line 22 of file zzaxyy.c.

real yphold
 

Definition at line 16 of file zzaxyy.c.

real ypscal
 

Definition at line 24 of file zzaxyy.c.

real ytop
 

Definition at line 11 of file zzaxyy.c.

struct { ... } zzpltr_
 

struct { ... } zzzplt_
 

 

Powered by Plone

This site conforms to the following standards: