EZXPLOT Fortran Xlib plotting routines EXZPLOT subroutines are designed to perform simple plotting on Sun workstations. They simulate micro-computer graphics and are designed to allow plotting in the simplest mannner possible. They use the X-windows subroutines written by Paul Parker (LeoLib). To use these subroutines, link your program with: ~shearer/PLOT/X/ezxplotlib.a (ezxplotlib_f90.a for F90 programs) ~shearer/PLOT/X/PAUL/LeoLib.0.9b/leolib.a (Solaris version) ~shearer/PLOT/X also contains the EZXPLOT source code and a program, testezxplot, which runs these routines. The Makefile in this directory will compile and link this program" NOTES: (1) Note that the arguments in EZXAXES are changed from the GKS version (EZPLOT) to make them compatible with the PSPLOT routines. (2) EZXDUMP is a simple bitmap dump of the screen. Thus, it does not have the resolution of Postscript files with direct move and draw commands. Please report bugs to: Peter Shearer pshearer@ucsd.edu LIST OF SUBROUTINES EZXANG(ang) sets the angle for drawing text. Input: ang = angle of text (degrees c.w. from horiz.) = 0. for normal (left to right) = 90. for up = 180. for right to left (upside down) = 270. for down Notes: ang is a real variable. diagonal angles are possible. EZXAXES(xtic,xlab,nxtic,xfrmt,ytic,ylab,nytic,yfrmt) makes a frame with tics and tic labels as specified. The position of the frame is assumed to be defined by the corners set in EZXWIND. xtic = small tic increment in user coordinates ylab = numbered tic increment (length is 2*nxtic) nxtic = small tic length in pixels xfrmt = format for x-axis numbers (see EZXNUMB for format details) etc. for y Note: Don't make tic increments negative even for reversed scale plots. EZXAXES should figure it out correctly. EZXCIR(x,y,irad,icol,ifill) draws circle of specified color x,y = user coordinates of center irad = radius in pixels icol = color, 0=wht,1=blk,2=red,3=blu,4=yel,5=grn,6=brw,7=pur,8=cyn,9=mag ifill = 0 for no fill, =1 for fill EZXCLR clears the entire window but does not quit the window. EZXCLRB(x1,x2,y1,y2) erases the screen in a box defined by x1,x2,y1,y2 in user coordinates. EZXCOL(icol) set current plotting color 0=white, 1 =black, 2=red, 3=blue, 4=yellow, 5=green, 6=brown 7=purple, 8=cyan, 9=magenta EZXDIG(x,y,ibut) returns the mouse position when a mouse button is hit Returns: x,y = coordinates of mouse (user coordinates) ibut = 1,2,3 for three mouse buttons = 4,5,6 when shift key is depressed EZXDRAW(x,y) draws a line from the current pen position to (x,y) and updates pen position (in user units as defined by EZXWIND). EZXDUMP(postfile) creates a Postscript file of current plot Input: postfile = file name for Postscript file EZXFRAM(x1,x2,y1,y2) draws a box with lower left corner (x1,y1) and upper right corner (x2,y2) in user coordinates. EZXINIT(nx,ny) creates an X-window for plotting Inputs: nx = number of x pixels in window ny = number of y pixels in window Note: A convenient setting for most Sun screens is (1138,800) EZXLAB(text) plots the string 'text' at the current pen position in a way determined by the current LORG setting. Angle of string can be changed with EZXANG. EZXLAX(xlabel,nx,ylabel,ny) puts x and y axis labels on axes. xlabel = x-axis label (string) nx = offset in pixels from bottom of axes ylabel = y-axis label (string) ny = offset in pixels from left of axes EZXLINE(iwid,idash) defines line width and dash length iwid = line width in pixels = 0 for thinnest, fastest line idash = dash length in pixels = 0 for solid line EZXLOADFONT(i,fontname) loads font and assigns index number. Input: fontname = fontname (e.g. '9x15' or '9x15bold') Returns: i = index for use by EZXSETFONT EZXLORG(n) allows the user to specify how text or numbers will be centered around the current pen position. This will affect EZXLAB and EZXNUM. 7xxxxxx8xxxxxx9 n = 4 5 6 centers block as shown 1xxxxxx2xxxxxx3 EZXMESS(text) displays text at bottom of window after erasing to make space. EZXMOVE(x,y) makes (x,y) the current pen position (in user units as defined by EZXWIND) but does not draw a line. EZXNICE(xmin,xmax,x1,x2) finds reasonable tic intervals for use by EZXAXES Inputs: xmin,xmax = lower and upper limits of plot Returns: x1 = small tic increment x2 = big tic increment EZXNUM(fnum,frmt) plots the real number at the current pen position according to format . Formats may be 'F', 'E', or 'I'. Don't enclose format with parenthesis. Note: fnum must be passed to EZXNUM as a real number. However note that it can be plotted as an integer by using an I format. EZXPOLY(x,y,n) draws a polygon connecting n points contained in arrays x and y. Note: For big plots EZXPOLY is faster than using a series of EZXDRAW commands. EZXSETFONT(i) set font using index number defined by EZXLOADFONT i = font index EZXSYMB(n,npix) plots symbols of height 2*npix at the current pen position. n=1 -- + n=2 -- square n=3 -- triangle n=4 -- inverted triangle n=5 -- X n=6 -- diamond EZXTIC(nx,ny,nup) draws a line (or merely moves) from the current pen position to a position nx pixels to the right and ny pixels up. nup = 0 -- move without drawing line nup = 1 -- draw line EZXTIC is useful for drawing tic marks and adjusting label postions on plots when absolute (pixel) motions are desired, since user units (defined by EZXWIND) are not used. Note: nx,ny can be negative. EZXWIND(x1,x2,y1,y2,x3,x4,y3,y4) defines a user scale for plotting which is used by most of the other EZXPLOT subroutines. (x1,y1) and (x2,y2) define the lower left and upper right corner of the plot area on the screen in pixels. (x3,y3) and (x4,y4) define the corresponding values at these points for the user scale. All other points will be linearly interpolated using these values. Note: EZXWIND and all EZXPLOT subroutines assume that the y scale is from bottom. EZXQUIT exits from the X-window after user hits mouse select key.