help needed for X-Y plotter under Sunview

Paul Turner pturner at ogcese.ogc.edu
Thu May 11 16:05:13 AEST 1989


In light of recent requests for a data plotter:

I've recently begun porting to Sunview an X-Y plotter I wrote a while
back. It's almost useful - features currently supported are:

       o Linear and polynomial regression
       o Running averages
       o Histograms
       o Fourier spectrum (DFT by FFT or by definition)
       o Transformations  (*,/,-,+,^,+built in functions & constants)
         (using this and linear regression gives exponential and power
          fits.) Uses a modified hoc. Like y=(x+1)*cos(2*PI*x/10)+1
       o Labels (x-axis, y-axis, title, subtitle)
       o Legends - placed anywhere on plot
       o Strings, rotated, sized (but not typed on the canvas)
       o Parameter files for saving a given plot setup
       o Batch mode for unattended plots
       o 15 sets, size limited by memory - easy to add more,
         15 is about all I've ever needed.
       o Linear, log-linear, linear-log, log-log plots
       o Many symbols, grid lines, spikes for spectral plots
         Sets can have both symbols and linestyles.
       o Linestyles, and thickness using pw_line()
       o Adjustable tick marks.
       o Autoscale
       o Flip x <-> y
       o Set world and viewport
       o Can use mouse for blow-up on regions of interest
       o Can use mouse to set view port
       o locator (reports mouse position in world coordinates)
       o Reads ASCII data (presently x,y - 1 point per line)     
       o reports Mean, std. dev., min, max of each set

The problems:

Written on a Sun4 under 4.0 with a 1600x1280 mono monitor. I used alerts
so it won't compile under <= 3.5 (we have a system running 3.5, so I'll
probably replace the alerts with something else, sometime). We don't have
a color monitor at our site, shouldn't be too hard to throw in support for
color (color is logically supported, you can select pens for the plotter).

Not much hardcopy support, we have a 7550 HP-plotter, and a LWII. I've
been using one of the HPGL to PostScript translators for output to the
LWII. Drivers aren't hard to write.

I use the Hershey fonts for characters. They really don't look too bad
printed on either the plotter or LWII, this could cause problems for other
hardcopy devices. I'm open to suggestions. I need portrait and landscape
fonts.

The user interface is in bad need of a second opinion. I'm not the hottest
Sunview programmer around.  I seem to be opening too many windows, I'd
like to consolidate things, I don't know, you tell me.

Sketchy user manual.

Fixed length arrays for sets, allocated at runtime


The future:

Splines
Text typed on canvas (I could use some help here)
edit data points with mouse - move, delete, add.
Adjustable tick marks, inward or outward pointing, size, etc.
Adjustable symbol size
Contouring and 3d plots
Suggestions?

I don't want to post it in general (I'd like some opinions first), if you
are interested and on the Internet (for ftp), let me know.  BTW, I'd like
to call it 'grtool', if this name belongs to something else then tell me.

This program should be considered a prototype....

Paul J. Turner		     
Department of Environmental Science and Engineering
Oregon Graduate Center
19600 NW Von Neumann Dr.
Beaverton, OR  97006-1999
pturner at ese.ogc.edu 
(503) 690-1043  	     



More information about the Comp.sys.sun mailing list