[ba.windows.x] Summary of responses for a graphics widget

chapman@lll-crg.llnl.gov (Carol Chapman) (08/30/90)

A gigantic thank you to all who responded to my request for a graphics
widget.  Here are the responses I got, along with my original request.

carol chapman

In article <67205@lll-winken.LLNL.GOV> I write:
>I may develop my own graphics widget if no one else has one that will
>serve my needs, but I don't want to reinvent the wheel if I don't have
>to.  My group needs a graphics widget that can plot up to 4 items on
>an x y axis where x and y will probably be time vs. value.  I'm
>willing to modify someone else's widget.  Ideally, we want to be able
>to graph both real-time and archived data.  Please let me hear any and
>all suggestions!
-----------------------

From rlr@astro.as.utexas.edu Wed Aug 29 07:10:31 1990
Return-Path: <rlr@astro.as.utexas.edu>

When I had this problem a year ago, I pulled the Caltech graph widget off
of MIT's expo X source archive (expo.lcs.mit.edu).  It worked, but did not suit
all my needs, so I rewrote parts of it.  It is a good basis to start from.

If you hear of any better ones, please let me know!

Thanks.
                       Randy Ricklefs
       uucp:  {ut-sally, ut-ngp, noao, charm}!utastro!rlr
  arpa:  rlr@astro.AS.UTEXAS.EDU       phone:  (512) 471-1342
-----------------------

From mazer@bek-owl.cns.caltech.edu Tue Aug 28 16:33:57 1990
Return-Path: <mazer@bek-owl.cns.caltech.edu>


One thing I found, though I'm not happy with it, is:
	csvax.caltech.edu:pub/GraphWidget.tar.Z

It does what you want, I've gotten it working with a bit of hacking,
but I really don't like it. It is basically a graph-widget as the
name implies; but, the code is quite convoluted and the widget is
implemented as two nested widgets and it's quite large. I tend
to use an xlib-based grapher through pipes rather than mess with
this particular widget!!

If you find anything better, could you please let me know?
Thanks,
/Jamie
------------------

From: crcraig@ATHENA.MIT.EDU
Received: by BOSTON-BRUINS.MIT.EDU (5.61/4.7) id AA21451; Tue, 28 Aug 90 19:48:35 -0400

My group at Project Athena is currently developing a set of software
tools (widgets and other library packages) aimed at developers of
courseware at MIT.  Among the widgets we have implementations of is a
"plotter" widget.  The plotter widget displays various plot types on a
set of x-y axes.  Each axis and plot is represented as an Object and
is a child of the plotter widget.  Currently, we have an XYPlot object
class that plots x-y data in various ways (connected data points with
either solid or dashed lines, unconnected data points, marked points,
and impulses).  We soon will be developing a BarChart object and a
ContourPlot object.

The biggest problems you will have with our current implementation is
gathering of data and it's redrawing policy.  The x-y data for the
XYPlot object is simply an array of doubles, set using XtSetValues.
Currently, the Plotter redraws its entire window whenever any resource
(of any of its children) is changed.  We are working on providing
incremental updates, where only the plot that changed is redrawn, but
that's still in the design stages.

Because the plotter widget uses Objects, it needs either Motif or
X11R4.  I haven't yet ported the plotter widget to R4, but I believe
it should be very easy, just filling in a CompositeClass extension
record.  I should warn you that this widget is still under
development, and it's still very likely that bugs exist.  It is,
however, being used in several pieces of courseware already, and it
appears to work well.

If you are interested, let me know.  We have reasonable man pages
available that I can email you if you wish.
--------------------------------------------------------------------------
Chris Craig                 Attention all planets of the Solar Federation,
crcraig@athena.mit.edu                          We have assumed control...
...!mit-eddie!mit-athena!crcraig   MIT-Project Athena, Cambridge, MA 02139

Oops!  I forgot to mention on of the plotter widget's biggest
features.  It is capable of outputting a high quality Postscript
drawing of itself.

					Chris Craig

-------------------------------

Return-Path: <ames!amdcad!netcom!netcom!dsmythe@tis.llnl.gov>

You might try looking at the performance monitoring icon (or whatever it's
called) that comes with X. That must use something like you're talking about.

Dave Smythe
netcom!dsmythe@apple.com   N6XLP  (also dsmythe@portia.stanford.edu)
--------------------------

From dew@vision5.anatomy.upenn.edu Wed Aug 29 06:59:38 1990
Return-Path: <dew@vision5.anatomy.upenn.edu>

I am in the process of developing a general graphics widget which takes as one of its resources
a pointer to a plotting subroutine.  Likewise a pointer to the data as well as any other customizable
features are included as resources.  In our lab, we need to plot 2-D data (space-time). The dependent var (z) is plotted
either as contour values or as a 3-D surface. Hence, the widget allows one to supply (and then change) the type 
of plot, azimuth and elevation of the surface plot, etc.  You could replace the plotting function with any function
of your choice.  The basic layout is:


                 ---------------------------------------
		| ------------------------------------	|
		||				      | |
		||				      | |
		||				      | |
		||				      | |
		||	Plotting Space	 	      | |
		||	(user definable size)	      | |
		||				      | |
		||				      | |
		||				      | |
		||				      | |
		||				      | |
		||				      | |
		| ------------------------------------	|
		|					|
		| Plot Type   []			|
		| Azimuth     30.0  [+] [-]		|
		| Elevation   60.0  [+] [-]		|
		| Hide Lines  []			|
		|					|
		 ---------------------------------------

Let me know if this might be of interest to you - I anticipate (1 week) to completion.

Dan Wollman
126 Anatomy-Chemistry Bldg/6058
University of Pennsylvania
Philadelphia, PA 19104
(215) 898-8048

dew@vision3.anatomy.upenn.edu
---------------------------------

From jen@mips.com Tue Aug 28 16:55:38 1990
Return-Path: <jen@mips.com>

Hi Carol,

could you steal the code from xplot to do what you want?

fred

-Fred Jen
UUCP: {decvax,ucbvax,ihnp4,hplabs}!decwrl!mips!jen
DOMAIN: jen@mips.com
USPS: MIPS Computer Systems, 930 Arques, Sunnyvale, CA 94086, (408) 524-8207
--------------------------

From stiles%bucko@STC.LOCKHEED.COM Wed Aug 29 10:09:17 1990
Return-Path: <stiles%bucko@STC.LOCKHEED.COM>

Carol,

Consider looking at the xplot program, which would seem to do what you
want.   Perhaps  it defines such   widgets, or  its routines  could be
modified to produce a general plotting widget.

If you don't have source for xplot, or access to  a source library for
ftp'ing, let me know, and I will send you xplot shar files via mail.

<<##################################################################>>
#>>   Randy Stiles               # stiles@bucko.laic.lockheed.com  <<#
<<#   Lockheed AI Center         #        Office: 415-354-5256     #>>
#>>   Orgn 96-20, Bldg. 259      #           Fax: 415-354-5235     <<#
<<#   3251 Hanover St.           # "A blow on the head is... worth #>>
#>>   Palo Alto, CA 94304-1191   # two in the bush" -Basil Fawlty  <<#
<<##################################################################>>
---------------------------

From myrias!fc@uunet.UU.NET Wed Aug 29 11:21:52 1990
Return-Path: <myrias!fc@uunet.UU.NET>

I have a program called "xplot" that you might be interested in.
Here's the README file for it.

franco

----------------------------------------------------------------

RATIONALE

   Why xplot, when we already have so many graphics programs?
Well, first of all it is a simple, straightforward, plot (5)
filter. No fancy buttons or options or silly syntax. Just
a plain old filter. However, it is implemented as an Athena
Labelwidget, so of course all the usual XToolkit options are
available.
   When first called, it immediately brings up a blank window,
and as plot(5) data appears on the input stream it draws
the stuff right away (it uses CBREAK mode). This means it
can be used either interactively, with a pipe, or with
a preprocessed file. We have used it here with the data
processing program "dra", which allows interective plotting
and manipulation of the data. Xplot draws in the background
pixmap of the window, so that redrawing is very fast (compared
with an xterm tektronix window for example). The disadvantage
of this, of course (there had to be one) is that on resizing,
the plot does not resize with the window, but retains its
original shape (it is properly centered though). Xplot is in general
much more convenient than the standard Tek window, since several
different windows can be maintained at once, to compare different
sets of data, for example. And you don't lose control of your
window. Each xplot window is destroyed by a mouse button press
anywhere, but not until EOF has been reached on the input stream.

PLOT (3X) LIBRARY

    The subdirectory xlibplot contains the standard plot(3x)
routines so that xplot can be called up from within any
C program, just by linking to this library.


COMPILATION

    Just make Makefile, then make xplot. If you don't have imake
and the X util sources you may have to edit the Makefile, but it
should be clear what to do.
-----------------------------

From vanandel@stout.atd.ucar.EDU Wed Aug 29 14:02:04 1990
Return-Path: <vanandel@stout.atd.ucar.EDU>

Please let me know what you find.  I am also looking for ways of graphing 
within an Xt toolkit framework.

	Joe VanAndel  		Internet:vanandel@ncar.ucar.edu
	NCAR - RSG  			
	P.O Box 3000		Fax:	 303-497-2044
	Boulder, CO 80307-3000	Voice:	 303-497-2071 
----------------------


Carol Chapman                                        Tel. (415) 423-7876
Livermore National Laboratory                        chapman@lll-crg.llnl.gov
P. O. Box 808, L-572            "Are you in charge here?"
Livermore, CA  94550            "No, but I'm full of ideas!"  -- Dr. Who