Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am salim-b on github.
  • I am salimb (https://keybase.io/salimb) on keybase.
  • I have a public key ASAYNoQhxSE-AVpqORXXz3QMWLSlXBYZyI2epM6417mrIgo

To claim this, I am signing this object:

@salim-b
salim-b / export_plotly2SVG.R
Last active October 19, 2022 16:20
R function to export Plotly graphs as static SVG (and optionally PDF and PNG) images.
# Remarks:
#
# The export is done using the automated testing framework [Selenium](https://
# de.wikipedia.org/wiki/Selenium) which results in opening a browser window
# (Google Chrome) that might has to be closed by hand. Other than Plotly's
# own `export()` function this one also allows to set the `width` and `height`
# of the exported plot (in the former it's hardcoded to 800x600 pixels). If
# `incl_PDF_copy`/`incl_PNG_copy` is set to `TRUE`, the exported SVG additionally
# gets converted to a PDF/PNG using the R package [`rsvg`](https://github.com/
# jeroen/rsvg/tree/40576ac326621b40224db344b09158f4ff717433) which relies on
@salim-b
salim-b / github_workflow.md
Created May 5, 2021 15:09
GitHub workflow