Doxygen Source Code Documentation
zzlogx.c File Reference
#include "f2c.h"
Go to the source code of this file.
Functions | |
int | zzlogx_ (real *x1, real *x2, real *y, integer *ndec, real *tmaj, real *tmin) |
Function Documentation
|
Definition at line 11 of file zzlogx.c. Referenced by zzaxxx_().
00013 { 00014 /* Initialized data */ 00015 00016 static real tmlog[8] = { .30103f,.47712f,.60206f,.69897f,.77815f,.84509f, 00017 .90309f,.95424f }; 00018 00019 /* System generated locals */ 00020 integer i__1; 00021 00022 /* Local variables */ 00023 static integer idec, imin; 00024 static real dxmaj, xmajr, ymajr, yminr, xx; 00025 extern /* Subroutine */ int zzline_(real *, real *, real *, real *); 00026 00027 00028 /* Draw a log axis from (X1,Y) to (X2,Y) [physical coordinates], */ 00029 /* with NDEC decades and the major and minor tic mark lengths in */ 00030 /* TMAJ and TMIN, respectively. */ 00031 00032 /* This array is LOG10 of 2,3,...,9; it is used to space the */ 00033 /* minor divisions. */ 00034 00035 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00036 */ 00037 zzline_(x1, y, x2, y); 00038 if (*tmaj == 0.f || *tmin == 0.f) { 00039 goto L8000; 00040 } 00041 ymajr = *y + *tmaj; 00042 yminr = *y + *tmin; 00043 dxmaj = (*x2 - *x1) / *ndec; 00044 xmajr = *x1; 00045 zzline_(&xmajr, y, &xmajr, &ymajr); 00046 00047 i__1 = *ndec; 00048 for (idec = 1; idec <= i__1; ++idec) { 00049 if (*tmin != 0.f) { 00050 for (imin = 1; imin <= 8; ++imin) { 00051 xx = xmajr + tmlog[imin - 1] * dxmaj; 00052 zzline_(&xx, y, &xx, &yminr); 00053 /* L100: */ 00054 } 00055 } 00056 xmajr += dxmaj; 00057 zzline_(&xmajr, y, &xmajr, &ymajr); 00058 /* L200: */ 00059 } 00060 00061 L8000: 00062 return 0; 00063 } /* zzlogx_ */ |