The file "millim.ps" contains a few PostScript procedures that draw millimetered paper, with logarithmic or linear scales both on x and y; the user should write a small PostScript program that calls these procedures. To do this, save millim.ps and edit a copy of that file; go to the end, and replace all the instructions between the two lines saying "%%Page 1 1" and "%%Trailer". Be careful: THE CASE IS SIGNIFICANT in PostScript! - The first line must be "init". - The default paper size is A4; if you are using Letter sized paper, insert here a single line saying "letter"; if you are using custom paper, insert here two lines defining the paper size, like the following examples (use the same to the case and obey the spacing). You can use as units inches, centimeters or millimeters simply typing "in" or "cm" or "mm"; if no unit is given the default is a "PostScript point", i.e. 1/72th of an inch): /xsheet 8.5 in def /ysheet 297 mm def /xsheet 612 def ("xsheet" and "ysheet" are the variable names holding the paper size; these statements store into them the correct values). - The default page orientation is portrait; if you need landscape orientation, insert here a single line saying "landscape". - Then insert (optional) lines to modify the default values of every constant that do not satisfy you needs; these constants with their default values are: /margin 2 cm def /fontsize 10 def /bordersize 1 def /linesize 0.4 def /smallsize 0.01 def /bordergray 0 def /linegray 0 def /smallgray 0 def and their meaning is the following: . "margin": the drawing is done in a rectangular region at "margin" from the paper borders. Be sure that the axis labels can fit in "margin" (these labels are ALWAYS printed). . "fontsize" is the height (in points) of the font (Times-Roman) used to print the axis labels. . "bordersize", "linesize" and "smallsize" are the width in points of the frame borders, the normal lines (divisions) and the small lines (subdivisions); see later for the definitions of the last two. . "bordergray", "linegray" and "smallgray" are the gray levels of these same lines: they must be values from 0 to 1 inclusive, 0 meaning black and 1 meaning white (i.e. not drawn). Be careful: on some printers "gray" lines are rendered as dotted lines; or, lines both "gray" and thin lines could or could not be drawn according to their position on the page. - Then, define two arrays "xscale" and "yscale" in the following way: /xscale [-2 2] def OR /xscale [0 1 10] def OR /xscale [0 2 10 4] def (the difference between these three variants is the number of arguments inside the square brackets; the same works for yscale). . With two arguments, the x/y scale is logarithmic; and the argument themselves are the powers of ten of the beginning and the end of that scale: [-2 2] means from 10^-2 to 10^2. . With three arguments, the scale is linear; the first and last arguments are the minimum and maximum value, and the middle one is the width of the axis intervals where a label and a "normal division" line will be inserted: [0 1 10] means from 0 to 10 with labels and divisions every unit. . With four arguments, the scale is still linear; the meaning of the first 3 arguments remains the same, and the fourth one is the number of sub-intervals in every "normal division": for every one of these sub-interval, a line is drawn but no label is printed. [0 2 10 4] means: lower value 0, higher value 10, label and normal line every 2 units, and each one of these "normal intervals" further divided in 4 intervals. - Then, insert a statement saying "drawsheet", to create the drawing. - Then, insert a statement saying "showpage", to print the drawing' - Then, send the file to a PostScript printer. ----- Enjoy! The file millim.ps with its content is public domain, and can be freely distributed and modified. Comments and modifications are gladly accepted via EMail to loreti@pd.infn.it MLO -- Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html Univ. of Padova, Dept. of Physics - Padova, Italy loreti@pd.infn.it