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  

zzlogy.c

Go to the documentation of this file.
00001 /* zzlogy.f -- translated by f2c (version 19961017).
00002    You must link the resulting object file with the libraries:
00003         -lf2c -lm   (in that order)
00004 */
00005 
00006 #include "f2c.h"
00007 
00008 
00009 
00010 
00011 /* Subroutine */ int zzlogy_(real *x, real *y1, real *y2, integer *ndec, real 
00012         *tmaj, real *tmin)
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 dymaj, xmajr, ymajr, xminr, yy;
00025     extern /* Subroutine */ int zzline_(real *, real *, real *, real *);
00026 
00027 
00028 /*  Draw a log axis from (X,Y1) to (X,Y2)  [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_(x, y1, x, y2);
00038     if (*tmaj == 0.f || *tmin == 0.f) {
00039         goto L8000;
00040     }
00041     xmajr = *x + *tmaj;
00042     xminr = *x + *tmin;
00043     dymaj = (*y2 - *y1) / *ndec;
00044     ymajr = *y1;
00045     zzline_(x, &ymajr, &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                 yy = ymajr + tmlog[imin - 1] * dymaj;
00052                 zzline_(x, &yy, &xminr, &yy);
00053 /* L100: */
00054             }
00055         }
00056         ymajr += dymaj;
00057         zzline_(x, &ymajr, &xmajr, &ymajr);
00058 /* L200: */
00059     }
00060 
00061 L8000:
00062     return 0;
00063 } /* zzlogy_ */
00064 
 

Powered by Plone

This site conforms to the following standards: