Takes four vectors (xmin, xmax, ymin and ymax) and returns the new values based on a given aspect ratio Aspect ratio is calculated as \(\frac{\Delta y\ }{\Delta x\ }\). Values > 1 therefore means portrait, values < 1 means landscape.
asp2extent(xmin, xmax, ymin, ymax, asp = 1)
xmin, xmax, ymin, ymax | Numeric Vectors of the same length specifying the x/y extents |
---|---|
aps | Aspect ratio calculated as specified in the description. A single numeric value or a vector in the same length as xmin etc. |
return | Returns a dataframe with four columns named |
At the moment, this function can only enlargen the extent in order to match the aspect ratio. At one point, it might be neccessary to add the option to shrink the extent accordingly.