SUBROUTINE AXES(X0,Y0,ANGLE,V0,DV,DL,NMAJ,NMIN,NFRAC, 1 TITLE,NCHRS,SIZE,JUST) C C This subroutine will draw and annotate a linear axis C as described by the input variables. C C X0,Y0 Location of the "origin" in scale inches relative C to the relocable origin. C ANGLE Angle in degrees of the axis with respect to a C rightward going horizontal, positive angle being C in the counterclockwise direction. C V0 Value of the axis at the "origin". C DV Change in value per major division. C DL Length of major divisions in scale inches. C NMAJ Number of major divisions. C NMIN Number of minor divisions per major division. C NFRAC Number of fractional digits in annotation. If C NFRAC < 1, no decimal point will be printed. C TITLE Character string containing the title. C NCHRS In absolute value, the number of characters in the C title. If positive, the annotation is to the C left of the axis (typical Y); if negative, to the C right (typical X). C SIZE Character size in scale inches for annotation. The C title will be 1.5*SIZE. C JUST Optional character specifying the justification C of the lines in the TITLE; Default: 'C'. C C Notes: Assuming an X axis to be at either 0 or 180 degrees and a C Y axis to be at +/-90 degrees, this subroutine will also set the C appropriate variables in COMMON /PSTN/ to allow calls to either C SUBROUTINE PSTN or SUBROUTINE NTSP. These two subroutines provide C an easy method of scaling and unscaling data. C COMMON /PLTR/ ILun, IDev, IsTerm, IMode, IXMax, IYMax, 1 Cnvrsn, CMag, CnvMag, IX0, IY0, KSetNo, IFancy, IBfDv3, 1 CSize, DeltaH, DeltaV, Upsiln, CosUp, SinUp, WidAdj COMMON /PSTN/ XZero, XScale, LogX, 1 YZero, YScale, LogY, YMin COMMON /AXESC/ CS, SN, SGN, TX, TY, DX, DY, 1 MIN, MIDL, MAX, MIDU, UMAX, WMAX, IFORM, JUSTFY LOGICAL LogX, LogY C C - IF NO PLOTTING IS TO BE DONE, RETURN. IF( IDEV .EQ. 0 ) RETURN NARG = 0 CALL NUMARG( NARG ) IF( ( NARG .EQ. 12 ) .OR. ( NARG .EQ. 13 ) ) GO TO 100 CALL OTSERR( 80 ) STOP C C - SAVE THE PRESENT PLOTTER STATUS. 100 CSAVE = CSize USAVE = Upsiln IX0S = IX0 IY0S = IY0 C C - CALCULATE THE JUSTIFICATION OF THE TITLE LINES. JUSTFY = 2 IF( NARG .EQ. 12 ) GO TO 200 CALL ITWAS( JUST, 'LCR', 3, JUSTFY ) IF( JUSTFY .EQ. 4 ) JUSTFY = 2 C C - SET NEW ORIGIN AND CHARACTER SIZE. 200 CALL CLRALL CALL CALPLT(X0,Y0,-3) CALL SIZEUP(ABS(SIZE),0.) C C - DRAW THE AXIS AND FILL COMMON /PSTN/. CALL AXES1(X0,Y0,ANGLE,V0,DV,DL,NMAJ,NMIN,NCHRS) IF( SIZE .LE. 0. ) GO TO 300 C C - ANNOTATE THE AXIS. CALL AXES2(V0,DV,NMAJ,NFRAC) C C - LABEL THE AXIS. CALL AXES3(ANGLE,NMAJ,TITLE,NCHRS,SIZE) C C - RETURN TO FORMAT PLOTTER STATUS. 300 CALL SIZEUP(CSAVE,USAVE) CALL CLRALL IX0 = IX0S IY0 = IY0S C RETURN END