1

I have a vector layer (point) with attribute columns cat, value1 and value2. I need to draw a scatter plot (value1 vs value2) in GRASS.

I can see scatter plot option for raster maps in GRASS? Is there a option available for vector/point map in GRASS?

  • I've solved the problem (scatter plot from vector attribute table) by importing attribute table in R (within GRASS) and installed "rgrass7" library. However, I'm looking for a command in GRASS to draw a scatter plot from vector (point) attribute table. – user1234 Nov 16 '16 at 17:21
0

For completness also here: I am not aware of a GUI tool for that, sorry. But you have the full power of R at your fingertips:

In your GRASS console start R and then

# Load GRASS library
library("rgrass7")

# Fetch attributes
attributes <- execGRASS("v.db.select", map=’yourvectormap’, separator=’,’)

# Parse the result
con <- textConnection(attributes)
data <- read.csv(con, header=TRUE)
str(data)

#Make your plot
plot(value1 ~ value2, data=data)

See also the GRASS-R-Wiki and an introduction into scatterplots in R.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.