Legend Added repeatedly when an actor was added again #1928
-
|
Hi, I am building an app using Pyvista. I encountered an weird problem. I created a dict, consists of some actors, like When I set a button to choose whether to remove an actor or add it again, the number of the legend of the re-added actor increased. When I did remove_actor, I did do plotter.remove_legend(), and the label of the actor is the same, so I'm not sure why this happened. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Try saving the |
Beta Was this translation helpful? Give feedback.

Try saving the
plotter.add_legend()call until after yourforloop. This is expected behavior as callingplotter.add_legend()multiple times would imply that multiple legends should be added