Description Usage Arguments Value Examples
Given (x,y) of the left-most and bottom-most points in a dataframe, find the angle required to rotate the plot to be straight. This function will return the degrees of rotation required to turn a plot straight. Specifically, it converts these two points into polar coordinates, then subtracts the angle of their interaction from 360 degrees. Used primarily within other functions like rotatePlot.
1 | findRotation(xleft, yleft, xbot, ybot)
|
xleft |
The x value of the leftmost point. |
yleft |
The y value of the leftmost point. |
xbot |
The x value of the bottommost point. |
ybot |
The y value of the bottommost point. |
This function returns a single numeric value representing the conversion factor needed to straighten a plot based on its leftmost and bottommost points. In essence, if the leftmost point is above the bottommost point in space, it will rotate counter clockwise until the y's of each point are equal. If they are already equal, no conversion will occur.
1 2 | findRotation(0,0,1,-1)
findRotation(0,2,0,0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.