Closed bananabenana closed 1 month ago
Hi, you could use function m_png to export a png figure https://swsoyee.github.io/r3dmol/reference/m_png.html
Hi, thanks for your fast response. Apologies for not getting this yet.
So if I run the following:
ribbon_structure_png <- r3dmol() %>%
m_add_models(m_bio3d(pdb)) %>%
m_set_style(m_style_cartoon(color = "white")) %>%
m_set_background_color(gray(0.9)) %>%
m_add_outline()
m_png()
How do I then save this object as a .png to disk and control resolution etc? I am using RStudio.
Sorry, it didn't support resolution and save to disk options. https://github.com/swsoyee/r3dmol/blob/0eefc1c2c430fff0122ae71ae8c9cc4e8912190c/inst/htmlwidgets/r3dmol.js#L200-L209
You could set the size of viewer (https://swsoyee.github.io/r3dmol/reference/init.html), right click and save the image directly.
Okay great, thanks for your help! Also once again, amazing software which we are using in an upcoming paper!
Hi,
Really love this tool and have made some awesome html-based figures. Do you have any guidance on the best way to export highres svg/pdf/png figures from this? Or natively from the r3dmol object?
Thanks