在 R 中导出 plotly plot 的 300dpi tiff

Export 300dpi tiff of plotly plot in R

有没有办法导出 300dpi 的 plotly plot? 我有一张旭日图要导出,但找不到获得所需分辨率的好方法。

您将需要安装 orca。请找到安装说明 here.

安装后,您可以使用 plotly 的 orca() 功能。 plotly book 提供以下有关以英寸 (DPI) 指定的导出的信息:

It’s worth noting that the height and width of a static image must be specified in pixels, which is intuitive for most file formats (png, jpeg, svg, etc) but when exporting to pdf, you might want to specify the size in inches. If you multiply the DPI of your machine’s display by the number of inches you want, you’ll get the desired result.

因此,对于 300 DPI,您将需要类似的东西:

orca(plot_ly(), width = 8 * 300, height = 11 * 300)

此外,您可能还想查看 this 相关文章。