Description Usage Arguments Examples
Styling options for the labels. Used inside m_add_label()
,
m_add_res_labels()
and m_add_property_labels()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | m_style_label(
font = "sans-serif",
fontSize = 18,
fontColor = "white",
fontOpacity = 1,
backgroundColor = "black",
backgroundOpacity = 1,
borderOpacity = 1,
borderThickness = 0,
borderColor = backgroundColor,
inFront = TRUE,
showBackground = TRUE,
fixed = FALSE,
alignment = c("topLeft", "topCenter", "topRight", "centerLeft", "center",
"centerRight", "bottomLeft", "bottomCenter", "bottomRight"),
position = NULL,
frame = NULL
)
|
font |
Font name, default sans-serif. |
fontSize |
Height of text, default 18. |
fontColor |
Font color, default white. |
fontOpacity |
Font opacity, default 1. |
backgroundColor |
Color of background, default black. |
backgroundOpacity |
Opacity of background, default 1. |
borderOpacity |
Opacity of border, default 1. |
borderThickness |
Line width of border around label, default 0. |
borderColor |
Color of border, default backgroundColor. |
inFront |
Logical, if |
showBackground |
Logical, show background rounded rectangle, default
|
fixed |
Logical, setes the label to change with the model when zooming. |
alignment |
String, how to orient the label with respect to position: 'topLeft' (default), 'topCenter', 'topRight', 'centerLeft', 'center', 'centerRight', 'bottomLeft', 'bottomCenter', 'bottomRight'. |
position |
x,y,z coordinates for label (for custom positioning). |
frame |
If set, only display in this frame of an animation. |
1 2 3 4 5 6 7 8 | r3dmol() %>%
m_add_model(data = pdb_1j72, format = "pdb") %>%
m_set_style(style = m_style_stick()) %>%
m_add_res_labels(style = m_style_label(
fontSize = 14,
backgroundColor = "green"
)) %>%
m_zoom_to()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.