r3.scatterplot - GRASS GIS manual (2024)

NAME

r3.scatterplot - Creates a scatter plot of 3D raster maps
Creates a scatter plot of two or more 3D raster maps as a vector map

KEYWORDS

raster3d, statistics, diagram, correlation, scatter plot, vector, voxel

SYNOPSIS

r3.scatterplot

r3.scatterplot --help

r3.scatterplot [-wfsub] input=name[,name,...] output=name [z_raster=name] [color_raster=name] [xscale=float] [yscale=float] [zscale=float] [position=east,north] [spacing=float] [vector_mask=name] [mask_layer=string] [mask_cats=range] [mask_where=sql_query] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-w
Place into the current region south-west corner
The output coordinates will not represent the original values
-f
Automatically offset each scatter plot
The output coordinates will not represent the original values
-s
Put points into a single layer
Even with multiple rasters, put all points into a single layer
-u
Invert mask
-b
Do not build topology
Advantageous when handling a large number of points
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

input=name[,name,...][required]
Name of input 3D raster map(s)
output=name[required]
Name for output vector map
z_raster=name
Name of input 3D raster map to define Z coordinates
color_raster=name
Name of input 3D raster map to define category and color
xscale=float
Scale to apply to X axis
Default: 1.0
yscale=float
Scale to apply to Y axis
Default: 1.0
zscale=float
Scale to apply to Z axis
Default: 1.0
position=east,north
Place to the given coordinates
The output coordinates will not represent the original values
spacing=float
Spacing between scatter plots
Applied when automatic offset is used
vector_mask=name
Areas to use in the scatter plots
Name of vector map with areas from where the scatter plot should be generated
mask_layer=string
Layer number or name for vector mask
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Default: 1
mask_cats=range
Category values for vector mask
Example: 1,3,7-9,13
mask_where=sql_query
WHERE conditions for the vector mask
Example: income < 1000 and population >= 10000

Table of contents

  • DESCRIPTION
    • Multiple variables
    • Layout
  • NOTES
  • EXAMPLES
    • Example with generated data
  • SEE ALSO
  • AUTHOR

DESCRIPTION

The r3.scatterplot module takes 3D raster maps and createsa scatter plot which is a vector map and where individual points inthe scatter plot are vector points. As with any scatter plot the Xcoordinates of the points represent values from the first raster mapand the Y coordinates represent values from the second raster map.Consequently, the vector map is placed in the combined value space ofthe original raster maps and its geographic position should be ignored.Typically, it is necessary to zoom or to change computational in orderto view the scatter plot or to perform further computations on the result.

With the default settings, the r3.scatterplot output allowsmeasuring and querying of the values in the scatter plot. Settingssuch as xscale or position option change the coordinatesand make some of the measurements wrong.

Multiple variables

If more than two raster maps are provided to the input option,r3.scatterplot creates a scatter plot for each unique pairof input maps. For example, if A, B, C, and D are the inputs,r3.scatterplot creates scatter plots for A and B, A and C,A and D, B and C, B and D, and finally C and D. Each pair is part ofdifferent vector map layer. r3.scatterplot provides textualoutput which specifies the pairs and associated layers.

A 3D scatter plot can be generated when the z_raster option isprovided. A third variable is added to each scatter plot and each pointhas Z coordinate which represents this third variable.

Each point can also have a color based on an additional variablebased on the values from color_raster. Values from a raster arestored as categories, i.e. floating point values are truncated tointegers, and a color table based on the input raster color table isassigned to the vector map.

The z_raster and color_raster can be the same. This can helpwith understanding the 3D scatter plot and makes the third variablevisible in 2D as well.When z_raster and color_raster are the same, total of fourvariables are associated with one point.

r3.scatterplot - GRASS GIS manual (2)r3.scatterplot - GRASS GIS manual (3)r3.scatterplot - GRASS GIS manual (4)

Figure: One scatter plot of two variables (left), the same scatter plot but with color showing third variable (middle), again the same scatter plot in 3D where Z represents a third variable (right).

r3.scatterplot - GRASS GIS manual (5)r3.scatterplot - GRASS GIS manual (6)

Figure: One scatter plot in with one variable as Z coordinate and another variable as color (two rotated views).

Layout

When working only with variable, X axis represents the first oneand Y axis the second one. With more than one variable, the individualscatter plots for individual pairs of variables are at the sameplace. In this case, the coordinates show the actual values of thevariables. Each scatter plot is placed into a separate layer ofthe output vector map.

r3.scatterplot - GRASS GIS manual (7)

Figure: Three overlapping scatter plots of three variables A, B, and C. Individual scatter plots are distinguished by color. The colors can be obtained using d.vect layer=-1 -c.

If visualization is more important than preserving the actual values,the -s flag can be used. This will place the scatter plots nextto each other separated by values provided using spacing option.

The layout options can be still combined with additional variablesrepresented as Z coordinate or color. In that case, Z coordinateor color is same for all the scatter plots.

r3.scatterplot - GRASS GIS manual (8)

Figure: Three scatter plots of three variables A, B, and C. First one is A and B, second A and C, and third B and C.

r3.scatterplot - GRASS GIS manual (9)

Figure: Three scatter plots of three variables A, B, and C with color showing a fourth variable D in all scatter plots.

The options xscale, yscale and zscale will causethe values to be rescaled before they are stored as point coordinates.This is useful for visualization when one of the variables hassignificantly different range than the other or when the scatter plotis shown with other data and must fit a certain area.The position option is used to place the scatter plot to anygiven coordinates. Similarly, -w flag can be used to place itto the south-west corner of the computation region.

NOTES

The resulting vector will have as many points as there is 3D rastercells in the current computational region. It might be appropriate touse coarser resolution for the scatter plot than for the othercomputations. However, note that the some values will be skippedwhich may lead, e.g. to missing some outliers.

The color_raster input is expected to be categorical rasteror have values which won't loose anything when converted from floatingpoint to integer. This is because vector categories are used to storethe color_raster values and carry association with the color.

The visualization of the output vector map has potentially the sameissue as visualization of any vector with many points. The pointscover each other and above certain density of points, it is not possibleto compare relative density in the scatter plot. Furthermore, if colorsare associated with the points, the colors of points rendered last arethose which are visible, not actually showing the prevailing color(value). The modules v.mkgrid andv.vect.stats can be used toovercome this issue.

EXAMPLES

Example with generated data

Set the computational region for generating data and subsequentanalysis:

g.region s=0 n=100 w=0 e=100 b=0 t=50 res=10 res3=10 tbres=1 -p3

Generate data using raster algebra:

r3.mapcalc "A = if(depth() < ndepths()/ 2, row()+col()+depth(), col())" -sr3.mapcalc "B = if(row() < nrows()/2, rand(0, nrows()) + col() + depth(), depth() + rand(0, nrows()))" -sr3.mapcalc "C = if(col() < ncols()/3, row() + depth(), rand(0, ncols()))" -sr3.mapcalc "D = depth()"

Create a scatter plot of correlations between A and B.Use C for the Z axes (height) and D for the color.

r3.scatterplot input=A,B output=scatterplot z_raster=C color_raster=D
r3.scatterplot - GRASS GIS manual (10)r3.scatterplot - GRASS GIS manual (11)

Figure: 2D scatter plot showing third variable as color and 3D scatter plot showing third variable as color and fourth variable on Z axis which uncovers another group of values not visible from the 2D scatter plot

SEE ALSO

r3.stats,d.correlate,v.mkgrid,v.vect.stats,g.region

AUTHOR

Vaclav Petras, NCSU GeoForAll Lab

SOURCE CODE

Available at: r3.scatterplot source code (history)

Latest change: Monday Jan 30 19:49:11 2023 in commit: 5fb6b1a969e72db28df78483d3360b15a17f0c68

Main index |3D raster index |Topics index |Keywords index |Graphical index |Full index

© 2003-2024GRASS Development Team,GRASS GIS 8.4.1dev Reference Manual

r3.scatterplot - GRASS GIS manual (2024)
Top Articles
Milwaukee Battery To Dewalt Tool Adapter For Sale — Plant With Clusters Of Tiny White Flowers Clue Like
Hoover CleanSlate XL Advanced Spot Cleaner - Hoover
Costco Gas Barstow
Centricity Kp Schedule
Kirksville Mo Swap Shop
Reli Stocktwits
855-409-4227
Field Box 38 Fenway
330-556-3579
Oontz Angle 3 Manual
Dawat Restaurant Novi
Über mich - Über Charly-G - Über Karl-Heinz Gebhardt
Do you pay taxes on Roth 401k gains?
Therapeutic Procedure Ati Template
Christmas concerts, comedy and more: The top 10 things to do in Bay County next week
Naughty Nails Southern Charms
Danielle Moodie-Mills Net Worth
Las Vegas Noaa
Pokeclicker Pikablu
Lake Compounce Family 4 Pack
Gotcha Paper 2022 Danville Va
In ganz Hamburg: Kommt zu diesen Side Events während des OMR Festivals 2024
New Jersey Cash Pop
Manhungay
Tamilyogi Movies Download 2022 Free Download
Vip Leauge.ic
Cash App Paid Screenshot
Orange Door 8000 Price
What Is GIAC Certification? A Guide
Complete Growth Inhibition of Pseudomonas aeruginosa by Organo-Selenium-Incorporated Urinary Catheter Material.
Www.craigslist.com Savannah Ga
Cherry Gorilla aka Cherry Gorilla Glue Weed Strain Information | Leafly
Best Far Side Jokes
Lady Eloise Cordelia Gordon-Lennox
Drumlin Farm Birthday Party
Tricare Dermatologists Near Me
Making and Using Paints in Ark Survival Evolved
Bodypump 116 Tracklist
BBC - History World Wars: The Allies at War
Cliffview Pilot Cliffside
Weitere relevante internationale Abkommen und Vereinbarungen
Bertelsmann-printing-group in Berlin auf Marktplatz-Mittelstand.de
Dragon Square Shield Osrs
Radical Red Ability Pill
Serenity Nail Salon Brentwood Tn
65 snow quotes guaranteed to warm your heart this winter
Chc Walk In Edmonds
Kuronime List
Waste Management Albuquerque Customer Service
Final Jeopardy July 25 2023
Metro Pcs Locations Near Me
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 5980

Rating: 4.1 / 5 (72 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.