draw_svg() is buggy
See original GitHub issueLooks like it’s dropping all unary and standalone nodes, and relabelling all of the other nodes accordingly. For example this code:
# Modify this code.
nodes_ex = io.StringIO("""\
id is_sample population time
0 1 0 0.0
1 1 0 0.0
2 1 0 0.0
3 1 0 0.0
4 1 0 0.0
5 0 0 1.0
6 0 0 1.5
7 0 0 2.0
8 0 0 3.0
9 0 0 3.5
10 0 0 4.0
""")
edges_ex = io.StringIO("""\
id left right parent child
0 0.00000000 1.00000000 5 0
1 0.00000000 1.00000000 5 1
2 0.00000000 1.00000000 6 2
3 0.00000000 1.00000000 6 3
4 0.00000000 0.50000000 7 5
5 0.50000000 1.00000000 8 5
6 0.50000000 1.00000000 8 6
7 0.00000000 0.50000000 9 6
8 0.00000000 0.50000000 9 7
9 0.50000000 1.00000000 10 8
""")
# Load the tree sequence.
ts = tskit.load_text(nodes=nodes_ex, edges=edges_ex, strict=False)
# Test by plotting it.
display(SVG(ts.draw_svg()))
draws a tree sequence like this:
but it should look more like this:
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Flickering when dragging a group with an SVG in it · Issue #127
I have a group element containing several elements, there's always an and optionally other stuff. The drag and drop works but it flickers...
Read more >Reveal SVG paths on scroll - GSAP - GreenSock
I've got an example but is very buggy ( for instance when you scroll to fast into the view the paths disappear and...
Read more >Filters on SVG objects not being applied when they are drawn ...
Chrome is buggy in its way to get the external elements referenced with the xlink:href attribute, or with a <funcIRI> ( url(#xxx) )...
Read more >Is there any simple way we can achieve this using CSS?
You can draw SVG with vector based drawing tools, no math needed here at all. ... does this design team code or just...
Read more >Author: admin - OGDF
new GraphIO::readTsplibXml() for reading tsplib instances in XML format; drawSVG() now draws cluster labels; drawSVG() now draws arrows heads correctly ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes; I’m happy to poke around, but I won’t have time for a few days. The height problem was logged in #319 also.
Works for me I think… Can you reproduce with the latest master?