GetArrow | R Documentation |
PlotResult
.Given a point, an angle information (in arithmetic degrees), and a length information, computes start and end points of an arrow usable via the arrows
function.
GetArrow(BaseX, BaseY, Degrees, Frac = 25)
BaseX |
must be a single value containing the x value of a point which later will be the center of the arrow. |
BaseY |
must be a single value containing the y value of a point which later will be the center of the arrow. |
Degrees |
must be a single value containing the desired rotation degree of the arrow. |
Frac |
must be a single value containing the length of the arrow. Default is 25 and for convenience, this parameter should in most cases be identical to FarmVars$Width. |
This function will be used internally by PlotResult
.
GetArrow
returns a vector of four values representing x and y for the start point and x and y for the end point of an arrow (in that order).
Carsten Croonenbroeck
Use PlotResult
to visualize the optimization result. See FarmVars
for the data object.
GetArrow(0.5, 0.5, 45) #At c(0.5, 0.5), generates an arrow pointing in north-eastern direction.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.