|
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
00043 static char fmt_101[] = "(\0021.E\002,i2)";
00044 static char fmt_102[] = "(\0021.E\002,i3)";
00045
00046
00047 integer i__1, i__2, i__3;
00048 real r__1, r__2;
00049 static char equiv_0[10];
00050
00051
00052 integer s_wsfi(icilist *), do_fio(integer *, char *, ftnlen), e_wsfi(void)
00053 ;
00054
00055
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 int zzlgin_(real *, real *, integer *);
00064 static integer nl1, nl2, npower, nshift;
00065 extern 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 int zzphys_(real *, real *);
00072 #define buf (equiv_0)
00073 static real dyv;
00074
00075
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
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094 if (*y1 == *y2) {
00095 goto L8000;
00096 }
00097
00098 yv1 = dmin(*y1,*y2);
00099 yv2 = dmax(*y1,*y2);
00100
00101
00102
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
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
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
00152
00153
00154 if (zzzplt_1.iycoor < 0) {
00155
00156
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
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
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
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
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
00229 }
00230
00231
00232 L8000:
00233 return 0;
00234 }
|