这令人惊讶地难以做到。我已经看到了:
Plotly as png in knitr/rmarkdown
Embedding plotly output in R markdown
这些都没有解决问题,似乎已经过时了。目前正在做这件事的人还是应该抛弃这个阴谋套餐?
编辑:
再看一下,显然这是真的:
https://community.plot.ly/t/use-plotly-offline-to-save-chart-as-image-file/408/6
contacting plotly support resulted in:
community members may only export to PNGs Other formats are
available with the profession plan: https://plot.ly/products/cloud/113
At the moment it is not possible to programatically export an image while using offline, i.e. confirming @jpp
You do have the option to use the camera icon in the mode bar on hover. This worked for me using plotly offline 1.9.3 and chrome, but not Firefox @thauta