[comp.sys.next] printf bug

schneidj@nextasy2.ece.wsu.edu.ece.wsu.edu (John B. Schneider) (07/02/90)

In <68@bode.ee.ualberta.ca> Eric Norum writes:

>p.s. A good way of getting semi-log plots (for frequency responses, etc.)
>     from Mathematica would be great!

I tried responding directly but couldn't get through.

You can get log plots in Mathematica by first loading the package
Graphics.m (located in /NextLibrary/Mathematics/Graphics).  You load
the package via the << operator or the Needs[] command.  If this
doesn't fit your needs, it usually only takes a slight hack to one of
these canned packages to get what you want.

With regard to his mention of gnuplot, I've been using gnuplot on the
NeXT for some time now -- haven't observed any problems yet.  I did
have to modify post.trm in order to get encapsulated postscript code
that I could paste into applications (like Draw and WriteNow).

I added the line

	fprintf(outfile,"0. setgray\n");

to post.trm. Now, post.trm reads

                  .
                  .
                  .
	fprintf(outfile,"/Gnu_save save def\n");
	fprintf(outfile,"%.3f %.3f scale\n",PS_SC,PS_SC);
	fprintf(outfile,"0. setgray\n");
                  .
                  .
                  .

All you have to do is set the terminal type to epsf1 or epsf2 and you
get nice "pastable" encapsulated postscript.