Closed MauriAndresMU1313 closed 2 years ago
Hi @MauriAndresMU1313, the trick is to set the background color of the canvas. Best, Deren.
import toytree
import toyplot, toyplot.svg
tree = toytree.rtree.rtree(10, seed=123)
c, a, m = tree.draw();
c.style["background-color"] = "white"
toyplot.svg.render(c, "/tmp/file.svg")
I have been working with a plot of a phylogenetic tree. All is fine, however, I was unable to generate a SVG file without a transparency background. I want a white background. Here an example:
I read the documentation, however, I was unable to find out. Here the code
Any idea?