Learn R Programming

VecStatGraphs2D (version 1.6)

DrawPoints: Graphic representation of points

Description

This function creates a graph that represents one point for each vector. Each vector is moved to a common origin (0, 0) without changing its azimuth and module. The user can define how many points are classified as outliers (in red color). The outliers can be calculated by the higher value of the modules or the harmonic mean. For that, the module value or the harmonic mean value is calculated for each vector. Points with the largest module value or harmonic mean value will be considered as outliers.

Usage

DrawPoints(data_x, data_y, PercentageOutliers = 5, HarmonicMean = FALSE)

Arguments

data_x
Vector containing the values of the X coordinates
data_y
Vector containing the values of the Y coordinates
PercentageOutliers
Integer value that indicates the percentage of outliers. The default value is 5.
HarmonicMean
Logical value. If HarmonicMean=FALSE, then the module is used for the calculation of outliers. if HarmonicMean=TRUE, then the HarmonicMean is used for the calculation of outliers. The default value is FALSE.

Value

  • This function returns no value and creates a graph that represents the end nodes of the vectors.

Details

Each vector is moved to a common origin (0, 0) without changing its azimuth and module. The graph represents the situation of the end nodes of the vectors. One way to obtain a set of X and Y coordinates of the vectors is to use the LoadData function. Typical usages are DrawPoints(data_x, data_y, \dots) DrawPoints(data_x, data_y, PercentageOutliers = 3, \dots) DrawPoints(data_x, data_y, HarmonicMean = TRUE, \dots) DrawPoints(data_x, data_y, PercentageOutliers = 3, HarmonicMean = TRUE) ......

References

Website http://gim.unex.es/VecStatGraphs2D/

See Also

DrawHistogram, DrawDistribution, DrawModuleAndAzimuthDistribution, DrawDensityMap, DrawVectors.

Examples

Run this code
FileName<-system.file("data/RectangularData.txt", package="VecStatGraphs2D")
   dat<-LoadData(FileName, Type=2, Direction=2)
   X_coordinate<-dat[,3]
   Y_coordinate<-dat[,4]
   DrawPoints(X_coordinate, Y_coordinate, PercentageOutliers=8)

Run the code above in your browser using DataLab