3D Images on GRASS

James Darrell McCauley mccauley at ecn.purdue.edu
Fri Jun 24 14:05:38 EDT 1994


CSCI2662 at CL.UH.EDU (CSCI2662 at CL.UH.EDU) writes on 23 Jun 94:
>CAN SOMEONE PLEASE TELL ME HOW TO GET A 3D IMAGE UP ON GRASS. WHERE THE DATA
>FILES ARE LOCATED AND WHAT TO DO.

[I'm CC'ing grassu cuz there's something other than SG3D and d.3d
 that everyone may not know about]

in ftp://moon.cecer.army.mil/grass/incoming
there's g.gnuplot (a grass version of gnuplot, which, BTW, is not GNU).
It has the advantage of being able to produce output for
roff (gpic), latex (eepic, latex, etc), and a few dozen other devices
(including postscript). This is particularly useful when
you want to include 3D (and 2D) graphs in reports. It can even do
bar graphs and polar plots (in case you're into radar or something).

I'm appending a script that will convert a grass raster
map to the required format.

I also see in that same directory g.gnuplot.3d by Janne Soimasuo.
I have not looked at this.

--Darrell

#!/bin/sh
# r.to.gnuplot
# Author: James Darrell McCauley, Purdue University
# GRASS-GRID> r.to.gnuplot raster_file > data
# GRASS-GRID> d.mon sta=x0
# GRASS-GRID> g.gnuplot
# gnuplot> set parametric
# gnuplot> set contour base
# gnuplot> set nosurface
# gnuplot> set view 180,0
# gnuplot> splot 'data' notitle with lines
r.stats -1g $1 | awk '$2 != row{print "";row=$2}{print}'



More information about the grass-user mailing list