X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



3571 Rate this article:
No rating

Why are there often black grids superimposed on 2-D scatterplots in ENVI?

Note: This help article applies only to Classic ENVI, and not to the new interface that was introduced with ENVI 5.

Many ENVI users have noticed that when they display a 2-D Scatterplot in ENVI using the tool available from the display menu under Interactive Tools -> 2-D Scatterplot, the scatterplot often appears to have a black grid superimposed on the data cloud.

ENVI’s 2-D scatterplots are always displayed in an IDL plot window that is sized such that the scatterplot axes are 256 pixels long (in this case the term pixel is referring to one element on your video monitor - a 'screen pixel' - rather than a 'data pixel' that refers to an image). This allows for each screen pixel in the plot window to represent one of 256 different data values. However, the data ranges assigned to the x and y axes of the scatterplot are automatically set to the data’s maximum and minimum values, essentially stretching out the data plotted on each axis. If the range of the data being scatterplotted is less than 256 then there will be some blank space in the scatterplot because of this stretching of the data range. For example if you have data values from 0 to 127 then every other screen pixel in the plot window would show a "gap", making a horizontal or vertical line across the scatterplot. If you have data values from 0 to 64 then you get 3 gaps between each data point.

This black grid that results from screen pixels being used as spacers between data points will usually happen only with byte or integer data. For floating point data, the image data being scatterplotted must be histogram binned first before being plotted. Thus, it would be the number of histogram bins that will determine if spacers will be necessary (and usually at least 256 bins are used regardless of the data range).

Try this:
1. Create a 256 x 256 test image using File -> Generate Test Data which is a horizontal ramp of byte data with values from 0 to 255.
2. Create a 256 x 256 test image which is a vertical ramp of byte data with values from 0 to 255.
3. Plot a 2-D Scatterplot with the two test images as the input x and y bands. The scatterplot should not show gaps (a black grid superimposed on it).

Next, try this:

1. Create a 256 x 256 test image which is a horizontal ramp of byte data with values from 0 to 64.
2. Create a 256 x 256 test image which is a vertical ramp of byte data with values from 0 to 64.
3. Plot a 2-D Scatterplot with the two new test images as the input x and y bands. The scatterplot should show gaps in the x and y direction (a black grid) because the data only have 65 possible values, but the plot has 256 possible places to show values.

Finally, try this:
1. Plot a 2-D Scatterplot with the horizontal ramp image with values between 0 and 255, and the vertical test image with values between 0 and 64 as the input x and y bands. The scatterplot should show gaps only in the x direction.
Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »