etetoolkit / ete

Python package for building, comparing, annotating, manipulating and visualising trees. It provides a comprehensive API and a collection of command line tools, including utilities to work with the NCBI taxonomy tree.
http://etetoolkit.org
GNU General Public License v3.0
768 stars 216 forks source link

Nodes label get duplicated every time show/render are called #733

Closed cerlumi closed 7 months ago

cerlumi commented 7 months ago

Testing the version 4.0.0-beta, I tried to create a simple graph.

The first display/rendering of the graph is correct, but every subsequent call to show or render adds an extra duplicated label.

Code to reproduce the issue.

from ete4 import Tree

t = Tree()
t.populate(3)
t.show()

# closing the window and running again
t.show()

# closing the window and running again
t.show()

# closing the window and trying to render an image
t.render('render.png')

Output: show_1 show_2 show_3 render

dengzq1234 commented 7 months ago

Hi in ete4 version, we no longer maintain with PyQt, which means we don't update in show(), render() method. Instead we use explore() in ete4 to visualize the tree