Git Product home page Git Product logo

Comments (2)

anfederico avatar anfederico commented on July 17, 2024

The enrichment and hierarchy maps were initially intended for interactive visualization for redundant genesets but we are working on a high quality export solution for network figures. In the meantime there are a couple of things you could do.

  1. Use some of the hyp_emap() code to recreate an igraph object for static plotting. This will let you fully customize your network figure and export to any resolution/format.
  2. Save the output from hyp_emap() or hyp_hmap() to a high resolution.
vn <- hyp_hmap(hyp)
vn <- visOptions(vn, width="5000px", height="5000px")
visNetwork::visSave(vn, "plot.html")

If you open the file in a web browser and immediately right-click / save, the network plot will be in high resolution, although not TIFF. With this route you can interactively adjust it before hand.

If you need to do this from a script - I've had some success with this snippet.

library(webshot)
if (Sys.which("phantomjs") == "") webshot::install_phantomjs()
tmp <- tempfile(fileext=".html")
vn <- hyp_hmap(hyp)
vn <- visOptions(vn, width="5000px", height="5000px")
visNetwork::visSave(vn, tmp)
webshot::webshot(tmp, selector=c("canvas"), zoom=1, file="plot.png")

Regarding the overlapping labels, you could interactively adjust the nodes to give them some more room. We can add a label trimming solution for these plots, but in the meantime you could simply pre-trim your geneset labels if they are long. Maybe subset on the first 16 characters?

from hyper.

anfederico avatar anfederico commented on July 17, 2024

This is addressed in the latest version, please refer to the documentation.

from hyper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.