[geeks] Quick graphs

dave at cca.org dave at cca.org
Mon Jul 8 19:41:32 CDT 2002


jdboyd at cs.millersville.edu writes:

>I need to put together a few graphs tonight.  These are just line
>graphs.  I have my data in the form of a text file with each line
>representing a point on the graph, and each line being a number, then
>a space, then a second number (representing x space y).  I just need
>something extremely simple that will spit out a .eps file suitable for
>import to Illustrator since I have to do a lot of formatting and
>markup stuff to it.

>I was trying to make gnuplot work last night, but I couldn't get it to
>do what I want.  I plan to look at yacas tonight, but I don't have any
>idea if it can spit out .eps files.

>EPS files are supposed to be simple.  Perhaps the fastest way would be
>to write a C++ program to read in the data and spit out .eps files, as
>soon as I figure them out.

do it in postscript.

example:



	0 0 moveto
	20.0 150.0 lineto
	40.0 120.0 lineto
	60.0 164.0 lineto
	80.0 60.0 lineto
	stroke

	/Helvetica findfont 18.0 scalefont setfont

	20.0 10.0 moveto (Line 1) show
	40.0 10.0 moveto (Line 2) show
	60.0 10.0 moveto (You get) show
	80.0 10.0 moveto (the idea.) show


x y values are in points (1/72 of an inch). Text strings are
in parenthesis.

Make this the first line of the file:

%!Adobe-PS-1.0

and everything will recognize it as PS.

Also, add this to the very end: (it basicly means "print the page now")

showpage

Postscript can be imported into Illistrator. (Ill. format *is* postscript,
with a bunch of setting stuff hidden in comment fields.)

------ David Fischer ------- dave at cca.org ------- http://www.cca.org ------
----------------- Live each day like the Triffids are coming. -------------



More information about the geeks mailing list