Go to Google Groups Home  
Web    Images    Groups    News    Froogle    more »
  Advanced Groups Search
  Preferences    
 Groups Search result 1 for Shamim-Mohamed graph-paper 
 Graphing Application • DeltaGraph Software Helps Visualize Results. 80+ Chart Types & Styles! • www.redrocksw.comSponsored Links 
 ASP.NET Charting Tool • Stunning charts for your asp.net web site. Free developer download! • www.dotnetcharting.com
 Graph Paper • New Customers Save 30%. Get Custom Printing and Personal Service. • www.nebs.com
Search Result 1
From: Gerard Blais (gblais@McRCIM.McGill.EDU)
Subject: Re: Source for Graph Paper
View: Complete Thread (3 articles)
Original Format
Newsgroups: sci.physics.research
Date: 1993-05-07 06:40:35 PST
[I am posting this, since it might be of use to a number of people - jb.]

I found this in comp.sources.postscript.  It is a semilog paper but
I think you can customize it to what you want, I haven't tried it though.
Hope this helps!

Gerard

------------- cut here --------------
%!
% Create graph paper, and plot points.
% Copyright Shamim Mohamed <shamim@cs.arizona.edu> Dec. 8 1992
%
% Can handle log and arith scales
% Labels axes, and then allows points to be plotted. See end of the file
% for examples of how points are plotted. Points are automatically scaled
% etc. depending on how the axes are specified.
%

% * This program is free software; you can redistribute it and/or modify
% * it under the terms of the GNU General Public License as published by
% * the Free Software Foundation; either version 2 of the License, or
% * (at your option) any later version.
% *
% * This program is distributed in the hope that it will be useful,
% * but WITHOUT ANY WARRANTY; without even the implied warranty of
% * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% * GNU General Public License for more details.

/inch {72.0 mul} def
/cm {28.35 mul} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Customise here
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/landscape false  def       % Page orientation
/p-radius  5   def     % radius of plotted points
/font    /Times-Roman def % text font for labels
/psize    11   def     % text size

% Spacing for major steps
/xspacing 1 inch def        % use either cm or inch as units
/yspacing 1 inch def

% Labels for the axes
/xtitle (Abscissa) def      % x-axis label
/ytitle (Ordinate) def      % y-axis label

% Use logarithmic scale?
/xlog true def
/ylog false def

% Start value for values on axes
% if a log axis is selected, and its start is 0, it will be changed to 1
/xstart 0.01 def
/ystart 10 def

% Major steps for axes
% (steps are multiplied for log scales, added for arith. scales)
/xstep 3.1622777 def
/ystep 5 def


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End Customisation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

/vsize psize 1.2 mul def
/xfracs [ xlog {2 1 9 {log} for}{.1 .1 .95 {} for} ifelse ] def
/yfracs [ ylog {2 1 9 {log} for}{.1 .1 .95 {} for} ifelse ] def
/c-at-show {     % <str> c-at-show --
   dup
   stringwidth pop -2 div
   0 rmoveto
   show
} bind def
/r-at-show {     % <str> r-at-show --
   dup
   stringwidth pop neg
   0 rmoveto
   show
} bind def
/baseline vsize psize sub def
landscape {clippath pathbbox pop exch pop add 0 translate 90 rotate newpath} if
clippath pathbbox
/top    exch def
/right  exch def
/bottom exch def
/left   exch def
/width  right left sub def
/height top bottom sub def
newpath

xlog xstart 0.0 eq and {/xstart 1 def} if
ylog ystart 0.0 eq and {/ystart 1 def} if

vsize 2.0 mul dup
bottom add /yorig exch def
left add /xorig exch def

font findfont psize scalefont setfont
/start xstart def
xorig yorig moveto xorig top lineto stroke
xorig yorig moveto right yorig lineto stroke

/nx 0 def
/ny 0 def
/str 10 string def
/lab xstart def
bottom vsize add baseline add
xorig xspacing right {
   exch dup 3 -1 roll exch
   2 copy pop yorig moveto 0 top rlineto stroke
   moveto lab str cvs c-at-show
   /lab lab xstep
   xlog {mul} {add} ifelse
   def
   /nx nx 1 add def
} for
xorig right add 2 div baseline bottom add moveto
xtitle c-at-show
/lab ystart def
xorig 3 sub
yorig yspacing top {
   exch dup 3 -1 roll
   2 copy exch pop xorig exch moveto right 0 rlineto stroke
   moveto lab str cvs r-at-show
   /lab lab ystep
   ylog {mul} {add} ifelse
   def
   /ny ny 1 add def
} for
gsave
psize 2 div left add yorig top add 2 div translate -90 rotate
0 0 moveto ytitle c-at-show
grestore

xorig yorig translate
xspacing yspacing scale
0 setlinewidth
gsave
nx {
   xfracs {
      0 moveto 0 top rlineto stroke
   } forall 1 0 translate
} repeat
grestore gsave
ny {
   yfracs {
      0 exch moveto right 0 rlineto stroke
   } forall 0 1 translate
} repeat
grestore

/draw-point {
   gsave
   initmatrix % naughty, naughty!
   currentpoint translate
   newpath
   0 0 p-radius 0 360 arc stroke
   0.7 p-radius mul
   dup dup moveto dup neg dup lineto stroke
   dup neg 2 copy moveto exch lineto stroke
   grestore
} bind def
xlog {/xfac xstep log def} if
ylog {/yfac ystep log def} if
/plot {
   ylog {ystart div log yfac div} {ystart sub ystep div} ifelse
   exch
   xlog {xstart div log xfac div} {xstart sub xstep div} ifelse
   exch moveto
   draw-point
} bind def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% plot points ...

1 15 plot
100 50 plot

showpage
-- 
===============================================================================
Gerard Blais         McGill Research Centre for Intelligent Machines
gblais@mcrcim.mcgill.ca         McGill University, Montreal, Quebec, Canada
===============================================================================


Google Home - Advertising Programs - Business Solutions - About Google

©2004 Google