Hi Dave,
Which plotter? I am always intrigued by such broad statements. I assume that you are speaking of. today’s ink jet or laser printers that can be made to produce plots.
I am still looking for a plotter package that I can use to drive my old Texas Instruments flatbed plotter. I know there was one written ages ago in Fortran, but they wanted $3000, 00 for a copy of the tape, so I passed. It takes ascii commands via an RS-232 port.
Thanks,
Mike G.
From: owner-lisp-hug@lispworks.com [mailto:owner-lisp-hug@lispworks.com] On Behalf Of David McClain
Sent: Wednesday, January 02, 2013 9:06 AM
To: Lisp Hug Lispworks
Subject: Great Code Giveaway...
[ message didn't make it through the other day... let's try again... (Graph now a JPG image instead of a PDF)]
Well, it has been more than 20 years with Lisp in earnest... I'm sitting on a gold mine of great code that I have used over the entire period, and still use daily in my work. But it seems the Lisp community is a bit short on libraries of code. No point sitting on all this stuff till I die...
One of the (many) great things I have found with Lisp is that Code Rot (I always called this Bit-Rot, but I realize that I'm wrongly attributing when I do that) is almost a non-problem, compared to just about every other language system that I have used in my 40+ year career. I'm still using a large body of code that I wrote nearly 15-20 years ago and has never needed any maintenance.
My code generally grows organically to supply solutions to problems I am facing in my own work. I generally don't write libraries for others to use. And that will show through in a lot of what I share with the world. C'est la vie...
The first bundle of code I'm sharing is my Plotter package for plotting 2-D data. I use this package just about every single day that I continue breathing. I can plot lists, vectors, arrays of data, as well as self-adaptively sampled functions of your choosing. It runs on LWM and LWW. I think it is very simple to use.
Repository is at https://github.com/dbmcclain/LispPlotter.git
Using the package is very simple, and it supports a huge range of possibilities. I should add some images to the repository to show off what it can do. Too much for this e-mail.
The simplest example I can think of, off the bat, is to do:
(plt:fplot 'sinc '(-10 10) (lambda (x) (/ (sin x) x)) :clear t :title "Sinc(x)")
which produces the following graph:
This is an example of a self-adaptive function plot. Plot calls are cumulative, hence the need every now and then to supply the :CLEAR T keyword option, to start anew. The first argument in every call is the name of the plotting window to which the commands should apply -- in this case 'SINC. (make up a name, any name will do)
Of course there will be questions from users, and I'll do my best to respond with decent answers. The code is free to use for all, without restrictions from me. If you improve it, I'd be very happy to accept the improvements.
By way of introduction, I have been writing plotting packages since 1974 when I wrote my first one for the PDP-10 in the Physics Dept at CCNY. That was in Fortran and ran on a drum plotter (anyone remember those?). To me, the only sensible view of data is in a graph, where you can see data values in context with other data values. Spreadsheet tables leave me cold.
More to follow... OODBMS, Crtypo on block codes and Elliptic Curve groups, etc. etc. etc.
Cheers,
Dr. David McClain : Can your lispPlotter project can be used in lispworks personal edittion? changxue. wislin@gmail.com _______________________________________________ Lisp Hug - the mailing list for LispWorks users lisp-hug@lispworks.com http://www.lispworks.com/support/lisp-hug.html