lvulliard/BioCircos.R

Saving output from Rstudio

Closed this issue · 0 comments

Dear Loan

I have created a very nice diagram using your BioCircos.R package using
R studio. I realise that the point of the package is to make
interactive diagrams, but I wondered if you know of a way to output the
plot as a high quality image suitable for a publication? Exporting the
image from R Studio results in a low dpi file.

Thank you for your help.

Dear X,

I'm unfortunately unaware of how to do that directely from Rstudio. However here is one way to do it:

  • Generate your figure normally.
  • Open it in a web browser (see screenshot attached on where that option is in Rstudio).
  • Extract and save the figure as SVG.
    • In Firefox, you can right click on the plot, choose "Inspect Element", copy the SVG element, paste that into a text file and save it with the ".svg" extension.
    • In Chrome you might be able to do the same or to directly use a plugin such as SVG Crowbar.

The resulting SVG file contains the Circos plot in a vector-based format, so it can be edited with Illustrator, converted to PDF and so on.
Best regards,

Loan

biocircosrstudiobug 1
screen shot 2019-01-11 at 10 50 51
screen shot 2019-01-11 at 10 51 03