Learn R Programming

VecStatGraphs2D (version 1.6)

DrawModuleAndAzimuthDistribution: Graphic representation of module and azimuth distributions

Description

This function creates a graph that allows us to check the angular and linear magnitudes simultaneously. The mean azimuth is plotted by a red arrow.

Usage

DrawModuleAndAzimuthDistribution(data_x, data_y, Direction = 2)

Arguments

data_x
Vector containing the values of the X coordinates
data_y
Vector containing the values of the Y coordinates
Direction
Integer value that indicates the direction of the data. Direction 1 = the mathematical direction (0 grades E counterclockwise). Direction 2 = the topographical direction (0 grades N clockwise). The default value is 2.

Value

  • This function returns no value and creates a graph that represents module and azimuth distributions.

Details

The graph draws a line for each vector. Each vector is moved to a common origin (0, 0) without changing its azimuth and module. The concentric circumferences allow us to identify linear magnitudes, and the legend of the angles allows us to determine the angular magnitude values. It is very important to work always with the same direction. If the data are loaded in topographical direction and the graphic representation of the module and azimuth distribution in the mathematical direction, then the resulting graph will be wrong. One way to obtain a set of X and Y coordinates of the vectors is to use the LoadData function. Typical usages are DrawModuleAndAzimuthDistribution(data_x, data_y, \dots) ......

References

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

See Also

DrawHistogram, DrawDistribution, DrawPoints, 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]
   DrawModuleAndAzimuthDistribution(X_coordinate, Y_coordinate, Direction=2)

Run the code above in your browser using DataLab