tpoorten / dotPlotly

Generate an interactive dot plot from mummer or minimap alignments
MIT License
188 stars 52 forks source link

How to generate a pdf or svg file? #18

Open Sven-Winter opened 1 year ago

Sven-Winter commented 1 year ago

Hi,

I managed to generate html and png plots. However, I always receive the following error:

Error in htmlwidgets::saveWidget(as.widget(gply), file = paste0(opt$output_filename, : Saving a widget with selfcontained = TRUE requires pandoc. For details see: https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md

I installed pandoc but the error remains.

Is there a way to generate a SVG file? Would be nice to save a SVG directly from the interactive plot instead of only png.

Thanks!

Jwindler commented 8 months ago

According to my experience, I found that as long as I modify the PNG parameter in the corresponding R script is SVG or PDF. @Sven-Winter

lonelyjoeparker commented 7 months ago

@Jwindler @Sven-Winter you're talking about this line right?

https://github.com/tpoorten/dotPlotly/blob/117448491cf7dc23100e3271169242bef4fd6a65/pafCoordsDotPlotly.R#L295

(Based on Hadley Wickham (2016) 'UseR!', 2nd edition, pp.185. Springer.)

Jwindler commented 7 months ago

ye @lonelyjoeparker

lonelyjoeparker commented 7 months ago

@Jwindler @Sven-Winter I forked/fixed/tested this quickly and created a pull request. Please feel free to test, report findings back here, and upvote to @tpoorten if you find useful thanks :grinning:

https://github.com/tpoorten/dotPlotly/pull/23