Description Usage Format Source Examples
These R values are symbolic constants that provide conceptual names for specific values used in C code. These control the appearance of the join between two lines rendered on a graphics device and also how the end of a line appears.
These symbolic constants correspond to enumerated constants in C code.
1 |
These are objects of class R_GE_lineend
or R_GE_linejoin
.
The R Graphics Engine code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | line = function(x1, y1, x2, y2, gcontext, dev) {
# Use the value
if(gcontext@lend == GE_ROUND_CAP) {
} else if(gcontext@lend == GE_BUTT_CAP) {
} else if(gcontext@lend == GE_SQUARE_CAP) {
}
# Use the name.
switch(names(gcontext@ljoin),
"GE_BEVEL_JOIN" = "bevel",
"GE_MITRE_JOIN" = "mitre",
"GE_ROUND_JOIN" = "round")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.