program ps_kom
c This program demonstrates:
c - special PS routines for PostScript (PS_...)
c - PostScript fonts
c - formula with subscripts
c - Greek characters
dimension x(10), y(10)
c call PARAMETERDUMP_LONG(1)
c PostScript font definition:
call FONT_SWITCH_CHARACTER ('$')
c Times-Roman is default font
call PS_DEFINE_FONT('A','Times-Roman')
call PS_DEFINE_FONT('B','Helvetica')
call PS_DEFINE_FONT('C','Symbol')
c back ground, with gray value 0.95 ( 0 = black, 1 = white)
call PS_BACKGROUND(0.95)
call GRIDLINES(1,1)
c gridlines linewidth in cm, gray value (lw, gv):
call PS_GRID_ATTRIBUTES(0.04, 1.0)
call SUPPRESS_TICKS(1,1)
call SUPPRESS_AXISLINES(1,1)
call CLIP_AT_AXES(1)
c frame lw, gv
call PS_FRAME_ATTRIBUTES(0.04, .0)
c Axis labels end title in font 'Helvetica'
c The axisnumbers iof a linear axis are plotted after the label, so the axisnumbers
c are in font A (Times-Roman).
c (Axisnumbers and label of logarithmix axis must have same font Times Roman)
call FRAME(10.,0.,10.,10.,0.,10.,
+ '$BXlab$A','$BYlab$A','$BPostScript features$A')
c line 1
do 10 i=1, 10
x(i)=i
10 y(i)=.1*i*i
c graph lw, gv
call PS_GRAPH_ATTRIBUTES(.2,.5)
call POLYLINE(' ',10,x,y)
c line 2
do 20 i=1, 10
x(i)=i
20 y(i)=.1*i*i+1.0
c graph lw, gv
call PS_GRAPH_ATTRIBUTES(.1,.0)
c line style
call LINE_STYLE_NR(2)
call POLYLINE(' ',10,x,y)
c white rectangle, used as blanked-out area:
x(1) = 1.
y(1) = 1.
x(2) = 6.
y(2) = 1.
x(3) = 6.
y(3) = 4.
x(4) = 1.
y(4) = 4.
c define gray value= 1 for rectangle
call PS_GRAPH_ATTRIBUTES(0.02, 1.)
call PS_FILL_AREA(' ', 4,x,y)
c define gray value = 0 for text:
call PS_GRAPH_ATTRIBUTES(0.02,0.)
c formula with subscripts (Times-Roman)
call GSTRNG(2.,3.,-.4,0.,'C')
call GSTRNG(999.,2.9,-.3,0.,'2')
call GSTRNG(999.,3.,-.4,0.,'H')
call GSTRNG(999.,2.9,-.3,0.,'5')
c Greek characters (font=Symbol):
call GSTRNG(2.,2.,-.3,0.,'$Ca$A = 1.0 , $CF$A = 2.0')
c call KOMPLOT with PostScript driver (50 = Encapsulated PS)
c call KOMPLOT(40,'psf.ps')
c prview with xv:
c call system('xv psf.ps')
end