Plots > XY Plots > Plotting Data > Example: Understanding Density Plots
Example: Understanding Density Plots
1. Define the initial number of data points.
2. Use the sin and rnd functions to define an array as a function of the data points.
3. Plot the array of data points against the normalized x-axis.
The visible gaps in the trace are due to the relatively low number of data points.
4. Define a larger number of data points.
5. Define and plot the new array of data points against the normalized x-axis.
There are far less visible gaps in the trace due to the relatively higher number of data points.
6. Define a much larger number of data points.
7. Define and plot the new array of data points against the normalized x-axis.
Since the number of data points is larger than 50000, the data is plotted using the density plot technique where data points with approximately equal values are mapped onto a single pixel. This mapping results in some pixels having one or more data points mapped onto them and other pixels having no data points mapped onto them. The latter pixels appear uncolored.
8. Compare the number of data points inside a small slice of the plot for all three plots.
Number of data points = 2000
Number of data points = 40000
Number of data points = 70000
As the number of data points increases, more data points appear close to a neighboring data point and plotting such data points makes them appear on the plot as one point.
Since the rnd function is used in the definition of the three arrays, recalculate the worksheet and observe the changes in the above plots.