[GRASS-dev] [GRASS GIS] #3190: Define colors in bivariate scatterplot according to third raster layer

#3190: Define colors in bivariate scatterplot according to third raster layer
-------------------------+-------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.6
Component: Default | Version: unspecified
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
I don't know if this is feasible, but what could greatly enhance the
scatter-plot tool is the option to define the point colours according to a
third raster layer. This would offer different ways to visually link
spatial patterns to e.g., patterns in environmental space. Think e.g.,
plotting rainfall against temperature, and colouring points in the plot
according to altitude layer, or plotting poverty against market access,
colouring points according to political units.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3190&gt;
GRASS GIS <https://grass.osgeo.org>

#3190: Define colors in bivariate scatterplot according to third raster layer
--------------------------+-------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.6
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by wenzeslaus):

This should be relatively easy for G7:d.correlate. How hard would be to
add it to the GUI (like G7:d.histogram) is another thing. I'm not sure how
about the wx-based scatter plot which is what you mean I suppose.

But since you asked, I finished `r.scatterplot` in r69716 which is derived
from `r3.scatterplot` and creates the scatter plot as vector map with
points, see:

https://grass.osgeo.org/grass70/manuals/addons/r.scatterplot.html

A scatter plot as vector points as opposed to an image has some pros and
cons. Some of the pros for the user are: you can measure and query in the
"image" using (all) the normal tools, visualize with full vector
visualization tool set, further select from the data, and you can
processes the data (to e.g. bin it). A significant con is (lower) speed
(if nothing else, you first iterate over the data to create the vector and
then once again to draw).

Here is an example result from the manual page:

[[Image(https://grass.osgeo.org/grass70/manuals/addons/r_scatterplot.png)]]

This concept is basically what is in R or Matplotlib where the spatial
data are often drawn using the originally non-spatial displays, here we
convert the non-spatial to spatial and use the spatial data display.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3190#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3190: Define colors in bivariate scatterplot according to third raster layer
--------------------------+-------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.6
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by pvanbosgeo):

This is great, a very interesting approach, and it seems to do precisely
what I was after. In fact, it is even better as it allows 3D graphs.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3190#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3190: Define colors in bivariate scatterplot according to third raster layer
--------------------------+-------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.0.7
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by martinl):

Still relevant?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3190#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>