Styling options for the labels. Used inside m_add_label()
,
m_add_res_labels()
and m_add_property_labels()
.
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 name, default sans-serif.
Height of text, default 18.
Font color, default white.
Font opacity, default 1.
Color of background, default black.
Opacity of background, default 1.
Opacity of border, default 1.
Line width of border around label, default 0.
Color of border, default backgroundColor.
Logical, if TRUE
always put in front of model.
Logical, show background rounded rectangle, default
TRUE
.
Logical, setes the label to change with the model when zooming.
String, how to orient the label with respect to position: 'topLeft' (default), 'topCenter', 'topRight', 'centerLeft', 'center', 'centerRight', 'bottomLeft', 'bottomCenter', 'bottomRight'.
x,y,z coordinates for label (for custom positioning).
If set, only display in this frame of an animation.
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()