[7900] in Athena Bugs

home help back first fref pref prev next nref lref last post

vax 7.2R: plot fortran library

daemon@ATHENA.MIT.EDU (panco@ATHENA.MIT.EDU)
Mon Aug 12 03:34:27 1991

From: panco@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Mon, 12 Aug 91 03:34:44 EDT

System name:		W20-575-103
Type and version:	CVAXSTAR 7.2R
Display type:		SM

What were you trying to do?

	Using the Tektronix window to make plots with the Fortran plot
library subroutines (See man 3f plot), a bug occurs when you try to
print a line that goes beyond the bounds of the plotting area.

What's wrong:

	In the Tektronix 4013 screen, the plotting area is defined as
that between the coordinates (0,0) to (780,780). If you write the
program:

C	
	call openpl()
	call erase()
	call line(200,200,300,780)
	call cont(400,200)
	call clospl()
	end

Compile it in the Tektronix window with:

 	f77 program.f -lf77plot -l4013

 and run it in that window, you get an upward pointing arrow. If you
change the coordinates of the fourth line of the program to read:

	call line(200,200,300,900)

(note that the 900 is out of bounds), recompile it and run it; you
still get a upward pointing arrow, but you don't see the tip (it is
out of the screen).

All that is OK. The problem is when you go below the low bound. If
your program instead said

	call line(200,200,300,0)

you would have a correct downward pointing arrow.

 BUT!!!! IF IT SAID:

	call line(200,200,300,-20)

(Again out of bounds, and you would be expecting a downward pointing
arrow which tip you couldn't see) YOU GET AN UPWARD POINTING ARROW
WHICH TIP YOU CAN"T SEE.  Whenever a coordinate goes out of bounds,
the machine takes it as if it went above the higher bound, even if
went below the lower bound. The same thing happens with the horizontal
bounds.

This problem is particularily troubling when you try to use the space
subroutine (For a description of space see man 5 plot) to try to
enlarge -zoom- some plot. If you write

	 call space(0,0,500,500)

 -now the plotting area is from (0,0) to (500,500)- before the call
line(200,200,300,780) instruction, you get a correct upward pointing
incomplete arrow. But if you write

	 call space(100,100,780,780)

 Before the call line(200,200,300,0), you get an UPWARD sloping
incomplete arrow, instead of the DOWNWARD sloping one that you would
be expecting. -Again same problem with horizontal inputs- . This bug
would seriously distort any plot that you were trying to magnify
-zoom-.

The same problem happens if you try to use the 4014 screen instead of
the 4013. I don't know if it happens for C programs.


Please describe any relevant documentation references:

	For information see:
		man 3f plot
		man 5 plot
		man 3x plot
		man 3g plot

	Also, to get the Tektronix window press Ctrl - Middle Mouse
Buttom in your xterm window -make sure Caps Lock is off-, and select
Switch to Tek Mode.


home help back first fref pref prev next nref lref last post