yline | R Documentation |
This function handles the collision between objects to be drawn, also accounting for labels. It is provided as a convenient component of custom drawing functions, and is currently in use in draw.boxes
and draw.steps
.
yline(boxes, start, end, label, labelStrand, labelCex, labelSrt, labelAdj,
labelOverflow, maxDepth)
boxes |
A |
start |
Single integer value, the left boundary of the window, in base pairs. |
end |
Single integer value, the right boundary of the window, in base pairs. |
label |
Single logical value, whether to print labels on boxes or not. |
labelStrand |
Single logical value, whether to add the strand at the end of labels or not. |
labelCex |
Single numeric value, character expansion factor for labels. |
labelSrt |
Single numeric value, string rotation angle for labels. |
labelAdj |
'left', 'right' or 'center', the horizontal adjustment of the labels on the boxes. |
labelOverflow |
Single logical value, whether to write labels on boxes too narrow to host them or not. |
maxDepth |
Single integer value, the maximum amount of box heights allowed on the plot to avoid overlaps (if exhausted an error message will be ploted, turning |
Returns boxes
with an additional "yline" integer column defining the y coordinate at which the box should be drawn to avoid collision. If an error occurs, a simpleError object will be returned instead and the drawing should be aborted (see draw.boxes
code for a functional example).
Sylvain Mareschal
draw.boxes
, draw.steps
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.