You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Appending labelled points to a scatter puts them into the wrong class #1971
Appending labelled points to a scatter plot puts them into the wrong class.
The client sends one trace per label present in the batch, named after the
label. The server ignores those names for an unnamed update and pairs the
entries with the plot's traces by position. So a batch holding only "dog"
is added to the first trace, "cat", and a label the plot hasn't seen yet is
added to an existing trace instead of getting its own.
Current Behavior
Starting from cat at x=1 and dog at x=2, 3:
append one dog (x=9) -> cat=[1, 9] dog=[2, 3] wrong class
append a new class bird (x=7) -> cat=[1, 7] dog=[2, 3] no bird trace
append bird (x=7) and dog (x=9) -> cat=[1, 7] dog=[2, 3, 9] bird lost into cat
The same happens with integer labels that don't start at 1 (labels 3 and 7,
appending a 7 lands in "3").
Expected Behavior
Each appended point joins the trace of its own label, and a new label gets a
new trace.
Steps to Reproduce
importnumpyasnpimportvisdomviz=visdom.Visdom()
viz.scatter(X=np.array([[1., 1], [2, 2], [3, 3]]),
Y=np.array(["cat", "dog", "dog"]), win="s")
viz.scatter(X=np.array([[9., 9]]), Y=np.array(["dog"]), win="s",
update="append")
# the point at x=9 is in the "cat" trace
Environment
visdom dev (reproduced at bda66a6)
Python 3.12
The pairing is the zip(idxs, new_data) loop in UpdateHandler.update
(py/visdom/server/handlers/web_handlers.py).
Hi @parth-bansal081 , thanks for the interest! This one is already fixed in #1972, which is linked above and under review, you can choose a different issue with no linked pr for contribution or suggest a new issue and work on it,check the CONTRIBUTING.md for more details.
Activity
parth-bansal081 commentedon Oct 14, 2026
Hi @piyush182004 , Is this issue open to contribute to?
piyush182004 commentedon Oct 14, 2026
Hi @parth-bansal081 , thanks for the interest! This one is already fixed in #1972, which is linked above and under review, you can choose a different issue with no linked pr for contribution or suggest a new issue and work on it,check the CONTRIBUTING.md for more details.