[GRASS-user] Hypsometry profile

Hamish hamish_b at yahoo.com
Thu Feb 7 19:08:39 EST 2008


mort wrote:
> I've generated profiles with use of r.profile command, so I have txt
> output file.
> On basis of this file I need to prepare the hypsometry profile.
> The simple one I can prepare with OpenOffice, but I need more
> complicated one which will prepare an output  file (eps, image?)
> at least with horizontal and vertical scale defined by the user (me
> in this case).
> Do you know any of such software running on Linux?


You could try with many softwares.... 

ETOPO2 dataset:
 g.region rast=etopo2
 r.transect -g map=etopo2 line=-180,0,90,360 > equator_elev.dat


All of the following should allow nice EPS output instead of default
ugly X-window versions. (e.g. Gnuplot's X-Window stuff is very ugly but
PNG,EPS,SVG output can look very nice)


Octave (or Matlab):
$ octave
>> eq_elev = load('equator_elev.dat');
>> figure(1)
>> plot(eq_elev(:,1), eq_elev(:,4))
>> figure(2)
>> hist(eq_elev(:,4))

R:
$ R
> eq_elev <- read.table("equator_elev.dat")
> hist(eq_elev[[4]])

Gnuplot:
$ gnuplot
gnuplot> set terminal postscript
gnuplot> set output 'elev.ps'
gnuplot> plot "equator_elev.dat" using 1:4 title 'Elevation'
(check if your version of gnuplot supports 'set style data histogram')




Python:  (maybe someone else can help here)
>>> plot() 
with Matplotlib (PyLab)
>>>  hist(x, 100)   # use 100 bins
#??


etc.


Hamish



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-user mailing list