|Coordinate Conversion Functions||R Documentation|
These functions convert between different units. The conversion occurs
within viewports unknown to
grid, but imported to R via
viewportConvertX(vpname, x, from, to = "svg") viewportConvertY(vpname, x, from, to = "svg") viewportConvertPos(vpname, x, y, from, to = "svg") viewportConvertWidth(vpname, x, from, to) viewportConvertHeight(vpname, x, from, to) viewportConvertDim(vpname, w, h, from, to)
The name of the viewport that the unit belongs within.
The size of the unit in
The type of unit that
The unit that
grid has conversion functions available, it
only converts units relative to the current viewport. After writing
out to SVG, we no longer have actual grid viewports to convert units
These functions are designed so that once coordinate information is
gridSVGCoords, we can
translate units within each of these viewports. Note: this requires
gridSVG plot has had viewport information exported.
These functions can be used in much the same way as
conversion functions, the only difference being that we have a new
svg, which represents the size of a unit in SVG pixels.
functions are for use with a viewport
that has a non-zero rotation (both
viewportConvertY() will fail in that situation
will give a not very useful answer).
A numeric vector containing a single value, the value of the new unit,
or a list with components
viewportConvertPos(), or a list with components
In the case of the
functions, we always return a value that is in terms of SVG pixels.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.