graph.README (Wed Oct 6 23:37:35 MET 1993) The file graph.tar.Z contains two shell scripts to extend the graph plotting capabilities of GRASS. They are basically frontends for gnuplot (or g.gnuplot). If you don't have gnuplot installed (see below), they won't work. - r.hplot.sh produces a histogram of the cell values from a single raster map. Gnuplot needs to have the `boxes' plotting capability (version 3.4 and later). - r.splot.sh produces a bivariate scatterplot of the cell data from two raster maps. (Works with older gnuplot versions as well.) I have tested these scripts on a sun4 (SunOs 4.1.1, /bin/sh). Partial testing (without running the GRASS commands) succeeded on an i386/387 equiped with NetBSD 0.9 (/bin/ash, gawk). Contents: ./graph/Gmakefile gmake4.x dependencies ./graph/README this file ./graph/[hs]plot.cat formatted manual pages, install manually ./graph/[hs]plot.man unformatted manual pages, install manually ./graph/[hs]plot.sh sources, install with gmake4.x Consider it experimental GPL-ed stuff that comes ``as is''. If you find these programs useful contributions to GRASS, find bugs, have comments, ideas for enhancement, etc., please e-mail to . I would appreciate it if you take the time to comment on one or more of the following issues: - What options/features are you missing or could be left out? - What other types of graphs-from-grass could you use (cummulative frequency, (log)normal probability, polar plots of aspect etc.)? - Do you feel the user has to know too much about gnuplot in order to use these programs? Are the manual pages clear enough? - I may consider doing C versions of this. Do you find gnuplot adequate enough or should it have hard-linked 'terminals'? This involves more work but seems feasible by using gnulib. Which output devices/formats would you wish to be included? - How about the idea of programming a (gnuplot) graph server (or daemon) so that gnuplot is started just once and listens for graph request from clients (grass [irsv].?plot programs)? Consider this as a graph `d.mon' capable of handling different output devices. For X11, this would provide the advantage of keeping the graph window open while the ?plot program exits. If you're not using SunOS or generic BSD4.[23], please specify your machine, OS and if it supports socket based IPC (i.e. if the command `man socket' actually produces a manual page). GNUPLOT: If you have gnuplot installed these scripts should work straight away. If you're using g.gnuplot, change the line cmd=gnuplot to cmd=g.gnuplot in [hs]plot.sh before running gmake4.x. If you don't have gnuplot at all, I urge you to get it. It's good stuff and useful outside GRASS as well. You may consider ftp-ing g.gnuplot from moon.cecer.army.mil (directory grass/incoming). This has a grass terminal for graph output in the grass graphics screen written by Darrell McCauley. I installed it as gnuplot (version 3.5) through the normal installation procedure and did the following to add the grass terminal: Makefile (copied from makefile.unx): - Add -DGRASS to TERMFLAGS = ... - Add -L/.../grass4.1/src/libes/LIB.sun4 to LIBS = ... where /.../grass4.1 is $GISBASE, sun4 is my arch (may differ) - Add -ldisplay -lraster -lgis to LIBS = ... I commented out (put between /* */ pairs) the following lines in term.c: #ifdef GRASS term_name = "grass"; #endif The reason for this is that I want to use it outside grass without defaulting to the grass terminal and give preference to a seperate X11 window for graph output instead of the grass graphics screen. Raymond Venneker Institute of Earth Sciences Free University Amsterdam venn@geo.vu.nl