m_set_viewer: Set viewer properties

Description Usage Arguments Value Examples

Description

Functions of setting viewer properties, such as width, height, background color, etc. The viewer size can be adjusted automatically under normal circumstances.

Usage

1
2
3
4
5

Arguments

id

R3dmol id or a r3dmol object (the output from r3dmol())

width, height

Weight and height numeric in pixels

hex

Hex code specified background color, or standard color spec character

alpha

Alpha level numeric (default 1.0)

Value

R3dmol id or a r3dmol object (the output from r3dmol())

Examples

1
2
3
4
5
6
7
library(r3dmol)

r3dmol() %>%
  m_add_model(data = pdb_6zsl, format = "pdb") %>%
  m_zoom_to() %>%
  m_set_width(300) %>%
  m_set_background_color("#666666", alpha = 0.9)

r3dmol documentation built on March 14, 2021, 5:08 p.m.