[GRASSLIST:8095] Re: r.profile & subsequent chart plot

Miha Staut mihastaut at yahoo.co.uk
Sun Aug 28 05:37:26 EDT 2005


Good plotting programmes are R or Gnuplot.
Example with the use of R:

GRASS 6.1.cvs (loc):~ > r.profile -i in=yourrast null="NA" > profile
> R   # start R
> profile <- read.table("profile", sep=" ", head=F)
> str(pr)
`data.frame':   439 obs. of  2 variables:
 $ V1: num  0 100 200 300 400 500 600 700 800 900 ...
 $ V2: int  NA NA NA NA NA NA NA NA NA NA ...
> plot(pr$V1,pr$V2,ty="l")

# If you wish to get height vs. length in equal scale use argument asp=1, e.g.
> plot(V1, V2, xlim = c(min(V1, na.rm=T), max(V1, na.rm=T)), ylim = c(min(V2,
na.rm=T), max(V2, na.rm=T)), asp = 1, ty = "l")

Miha Staut


--- M S <mseibel at gmail.com> wrote:

> i managed to get a nice output from grass's r.profile to get a cross section.
> 
> anyone recommend a good program to then plot it with to creat the
> cross section graphic?



	
	
		
___________________________________________________________ 
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com




More information about the grass-user mailing list