Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

就是问一下,如何在jupyter lab 里输出图片?虽然貌似不是包本身的问题。 #26

Closed
sanbeichahegongheguo opened this issue Mar 7, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sanbeichahegongheguo
Copy link

在 Rstudio 里可以输出图片,但是在 jupyter Lab 里无法输出。

不知道是不是哪里不对?

@swsoyee
Copy link
Owner

swsoyee commented Mar 7, 2021

在 RStudio 中你应该是在 View 中点击 Export 导出图片的吧?目前包本身尚未支持导出成图片格式,如果想保存为图片的话可能需要用到 {webshot} 对 widgets 储存为网页然后截图导出。

输出图片功能肯定在未来需要加进去的,不过目前来说还是稍有难度,需要一些时间。

@swsoyee swsoyee self-assigned this Mar 9, 2021
@swsoyee swsoyee added the enhancement New feature or request label Mar 9, 2021
@swsoyee swsoyee added this to the v0.1.2 milestone Mar 9, 2021
swsoyee added a commit that referenced this issue Mar 9, 2021
feat(png): implement widget to png (#26)
@swsoyee
Copy link
Owner

swsoyee commented Mar 9, 2021

@sanbeichahegongheguo 已经追加了 m_png() 可将输出转换成png了。但是我还没有试过在 Jupyter Lab 中是否可用,理论上应该没问题。可以安装 GitHub 的开发版尝试并反馈一下嘛?谢谢。

# install.packages("devtools")
devtools::install_github("swsoyee/r3dmol")

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

image

@sanbeichahegongheguo
Copy link
Author

好,一会我就试试。

@sanbeichahegongheguo
Copy link
Author

image

问题解决了。目前没有问题。
之前大概率是我自己jupyter的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants