m_png: Convert widgets to PNG image

Description Usage Arguments Value Examples

View source: R/save.R

Description

Convert widgets to PNG image

Usage

1

Arguments

id

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

width, height

image width and height.

Value

Base64 encoded png image wrapped by <img> tag.

Examples

1
2
3
4
5
6
7
library(r3dmol)

r3dmol() %>%
  m_add_model(data = pdb_1j72, format = "pdb") %>%
  m_set_style(style = m_style_cartoon()) %>%
  m_zoom_to() %>%
  m_png(width = 600)

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