# 6. Scatter Plot¶

The window Scatter plot displays pixel values for two raster bands as points in the 2D space. Scatter plots are useful for assessing ROI separability between two bands.

Scatter Plot

The functions are described in detail in the following paragraphs.

## 6.1. Scatter list¶

• Scatter list:
• S: checkbox field; if checked, the spectral signature is displayed in the plot;
• MC ID: signature Macroclass ID;
• MC Info: signature Macroclass Information;
• C ID: signature Class ID;
• C Info: signature Class Information;
• Color: color field; double click to select a color for the plot;
• Band X : X band of the plot;

• Band Y : Y band of the plot;

• Precision : use custom precision for calculation (precision should be selected according to pixel values):
• 4 = $$10^{-4}$$
• 3 = $$10^{-3}$$
• 2 = $$10^{-2}$$
• 1 = $$10^{-1}$$
• 0 = 1
• -1 = 10
• -2 = $$10^{2}$$
• -3 = $$10^{3}$$
• Calculate : calculate the scatter plot for the ROIs checked in the list;

• : remove highlighted signatures from this list;

• : add a temporary scatter plot to the list (as MC Info = tempScatter) and start the plot calculation of the last temporary ROI (see Working toolbar);

• : add a temporary scatter plot to the list (as MC Info = tempScatter) and start the plot calculation of pixels in current display extent;

• : add a temporary scatter plot to the list (as MC Info = tempScatter) and start the plot calculation of the entire image;

WARNING: Using a precision value that is too high can result in slow calculation or failure.

### 6.1.1. Scatter raster¶

This tool allows for the drawing of selection polygons inside the scatter plot; these selection polygons are used for creating a Scatter raster that is a temporary raster classified according to the intersection of scatter plots and drawn polygons.

Pixels of the active band set are classified, according to scatter plot bands, if pixel values are in the range of intersection between scatter plots and selection polygons (polygons should not overlap). The value assigned to the Scatter raster pixels is the sequential number of selection polygon; also the raster color is derived from the selection polygon.

After the creation of a new Scatter raster, old rasters are placed in QGIS Layers inside a layer group named Class_temp_group (custom name can be defined in Temporary group name) and are deleted when the QGIS session is closed.

• : activate the cursor for interactively drawing a polygon in the plot; left click on the plot to define the vertices and right click to define the last vertex closing the polygon;
• color: select the color of polygon (which is used also in the Scatter raster);
• : remove all the selection polygons from the plot;
• : calculate the Scatter raster and display it in the map;
• : calculate the spectral signature of the Scatter raster (considering all the classified pixels) using the active band set, and save the signature to the ROI Signature list;
• Extent : extent of the Scatter raster; available options are:
• Same as display: extent is the same as map display;
• Same as image: extent is the same as the whole image;

### 6.1.2. Plot¶

Left click and hold inside the plot to move the view of the plot. Use the mouse wheel to zoom in and out the view of the plot. Right click and hold inside the plot to zoom in a specific area of the plot.

• Colormap : select a colormap that is applied to highlighted scatter plots in the list when is clicked; if no scatter plot is highlighted then the colormap is applied to all the scatter plots;
• : automatically fit the plot to data;
• : save the plot image to file (available formats are .jpg, .png, and .pdf);
• x y: display x y coordinates of mouse cursor inside the plot;

Example Scatter Plot