Skip to content

Conversation

@moe-ad
Copy link
Contributor

@moe-ad moe-ad commented Feb 9, 2026

See #465 for context.

@github-actions github-actions bot added the enhancement New features or code improvements label Feb 9, 2026
@moe-ad moe-ad force-pushed the feat/more-customization-api branch from ba450bd to 4358e39 Compare February 9, 2026 15:10
@AlejandroFernandezLuces
Copy link
Collaborator

Thanks for moving the changes here!

On the add_point_labels, after looking into it, the main difference between adding a label and adding text, is the fact that the label will always be facing the user, while adding text will rotate with the scene. This is a reason good enough to have a public API for this. Although, the reason why PyVista calls it point_label is because in VTK you can associate labels to their different types of objects: points, edges, vertex, etc. So, I would rename it to simply add_label, to be as generic as possible. But agreed that this is a legitimate use case for the public API.

For the clear method, I still think it kind of leads to confusion for users. I think it leads to think that the flow would be something like this:

plotter.plot(mesh)
plotter.show()
plotter.clear()
plotter.plot(mesh)

which breaks for PyVista, our major backend. We could make a workaround in the PyVista backend by recreating the plotter instance after a show(), so externally you don't need to create another instance, but I feel this is incredibly hacky.

I understand your interactive argument, but it compromises scripting and coding in my opinion. What do yout think? Do you see any way of clarifying this for the users elegantly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New features or code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants